X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fpassword%2FParameterizedPassword.php;h=78d624ce103ef0faa556abe7c2c6d574b72c8cba;hb=6aa6eb45885b10a2927fcda7caec8cd88c2b596f;hp=187f8954213d626f75a4e3f213773bc9b2d49c4d;hpb=30e009794bacc2e3138c372e6ddf876dca2d4a9c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/password/ParameterizedPassword.php b/includes/password/ParameterizedPassword.php index 187f895421..78d624ce10 100644 --- a/includes/password/ParameterizedPassword.php +++ b/includes/password/ParameterizedPassword.php @@ -40,14 +40,14 @@ abstract class ParameterizedPassword extends Password { * Named parameters that have default values for this password type * @var array */ - protected $params = array(); + protected $params = []; /** * Extra arguments that were found in the hash. This may or may not make * the hash invalid. * @var array */ - protected $args = array(); + protected $args = []; protected function parseHash( $hash ) { parent::parseHash( $hash ); @@ -79,7 +79,7 @@ abstract class ParameterizedPassword extends Password { } public function needsUpdate() { - return parent::needsUpdate() || $this->params !== $this->getDefaultParams(); + return $this->params !== $this->getDefaultParams(); } public function toString() { @@ -90,7 +90,9 @@ abstract class ParameterizedPassword extends Password { $str .= $this->getDelimiter(); } - return $str . $this->hash; + $res = $str . $this->hash; + $this->assertIsSafeSize( $res ); + return $res; } /**