updated plugin WP Mail SMTP
version 2.0.0
This commit is contained in:
@ -2762,7 +2762,7 @@ class RSA
|
||||
// if $m is larger than two million terrabytes and you're using sha1, PKCS#1 suggests a "Label too long" error
|
||||
// be output.
|
||||
|
||||
$emLen = ($emBits + 1) >> 3; // ie. ceil($emBits / 8);
|
||||
$emLen = ($emBits + 7) >> 3; // ie. ceil($emBits / 8);
|
||||
$sLen = $this->sLen !== null ? $this->sLen : $this->hLen;
|
||||
|
||||
$mHash = $this->hash->hash($m);
|
||||
@ -2840,7 +2840,7 @@ class RSA
|
||||
|
||||
// RSA verification
|
||||
|
||||
$modBits = 8 * $this->k;
|
||||
$modBits = strlen($this->modulus->toBits());
|
||||
|
||||
$s2 = $this->_os2ip($s);
|
||||
$m2 = $this->_rsavp1($s2);
|
||||
@ -2848,7 +2848,7 @@ class RSA
|
||||
user_error('Invalid signature');
|
||||
return false;
|
||||
}
|
||||
$em = $this->_i2osp($m2, $modBits >> 3);
|
||||
$em = $this->_i2osp($m2, $this->k);
|
||||
if ($em === false) {
|
||||
user_error('Invalid signature');
|
||||
return false;
|
||||
|
@ -97,7 +97,10 @@ class Random
|
||||
$fp = @fopen('/dev/urandom', 'rb');
|
||||
}
|
||||
if ($fp !== true && $fp !== false) { // surprisingly faster than !is_bool() or is_resource()
|
||||
return fread($fp, $length);
|
||||
$temp = fread($fp, $length);
|
||||
if (strlen($temp) == $length) {
|
||||
return $temp;
|
||||
}
|
||||
}
|
||||
// method 3. pretty much does the same thing as method 2 per the following url:
|
||||
// https://github.com/php/php-src/blob/7014a0eb6d1611151a286c0ff4f2238f92c120d6/ext/mcrypt/mcrypt.c#L1391
|
||||
|
Reference in New Issue
Block a user