X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fsession%2FSession.php;h=3dc8299be941e4277f8c3775c7315dfaefcbcba8;hb=b8e0ca16aa743581f5fac5cef8bed5ac2bf6e7cb;hp=024bf9a2b0eafe074d9f600e2dd0bce9adec6d60;hpb=6f4eda1fd3e4f592c30b4b8a86bac53301eaec9f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/session/Session.php b/includes/session/Session.php index 024bf9a2b0..3dc8299be9 100644 --- a/includes/session/Session.php +++ b/includes/session/Session.php @@ -291,7 +291,7 @@ final class Session implements \Countable, \Iterator, \ArrayAccess { /** * Fetch a value from the session * @param string|int $key - * @param mixed $default Returned if $this->exists( $key ) would be false + * @param mixed|null $default Returned if $this->exists( $key ) would be false * @return mixed */ public function get( $key, $default = null ) { @@ -481,7 +481,7 @@ final class Session implements \Countable, \Iterator, \ArrayAccess { // Encrypt // @todo: import a pure-PHP library for AES instead of doing $wgSessionInsecureSecrets - $iv = \MWCryptRand::generate( 16, true ); + $iv = random_bytes( 16 ); $algorithm = self::getEncryptionAlgorithm(); switch ( $algorithm[0] ) { case 'openssl': @@ -522,7 +522,7 @@ final class Session implements \Countable, \Iterator, \ArrayAccess { /** * Fetch a value from the session that was set with self::setSecret() * @param string|int $key - * @param mixed $default Returned if $this->exists( $key ) would be false or decryption fails + * @param mixed|null $default Returned if $this->exists( $key ) would be false or decryption fails * @return mixed */ public function getSecret( $key, $default = null ) {