src: undo change to edge case in Local TOTP #2390

TOTP modifies password, we can't use verbatim length checks.

Spotted by: @adschellevis
This commit is contained in:
Franco Fichtner 2018-05-25 09:49:31 +02:00
parent 77ed8e6906
commit ecc15a7680
2 changed files with 14 additions and 1 deletions

View File

@ -106,7 +106,10 @@ class Local extends Base implements IAuthConnector
}
/**
* check if the user should change his or hers password, calculated by the time difference of the last pwd change
* check if the user should change his or hers password,
* calculated by the time difference of the last pwd change
* and other criteria through checkPolicy() if password was
* given
* @param string $username username to check
*/
public function shouldChangePassword($username, $password = null)

View File

@ -173,6 +173,16 @@ trait TOTP
return false;
}
/**
* check if the user should change his or hers password
* @param string $username username to check
*/
public function shouldChangePassword($username, $password = null)
{
/* XXX deconstruct password and pass it */
return parent::shouldChangePassword($username);
}
/**
* set TOTP specific connector properties
* @param array $config connection properties