Prevent credentials from being leaked in backtrace in some instances (#9817)

* Prevent credentials from being leak in backtrace in some instances
Particularly before the user is authenticated

* fix test
This commit is contained in:
Tony Murray
2019-03-05 00:24:14 -06:00
committed by GitHub
parent e17f47a329
commit f4a33c1a34
15 changed files with 146 additions and 162 deletions

View File

@@ -52,9 +52,9 @@ class ADAuthorizationAuthorizer extends MysqlAuthorizer
}
}
public function authenticate($username, $password)
public function authenticate($credentials)
{
if ($this->userExists($username)) {
if (isset($credentials['username']) && $this->userExists($credentials['username'])) {
return true;
}