Use OpaqueEnvelopes for all passwords in Phabricator
Summary: See D2991 / T1526. Two major changes here: - PHP just straight-up logs passwords on ldap_bind() failures. Suppress that with "@" and keep them out of DarkConsole by enabling discard mode. - Use PhutilOpaqueEnvelope whenever we send a password into a call stack. Test Plan: - Created a new account. - Reset password. - Changed password. - Logged in with valid password. - Tried to login with bad password. - Changed password via accountadmin. - Hit various LDAP errors and made sure nothing appears in the logs. Reviewers: vrana, btrahan Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D2993
This commit is contained in:
@@ -37,9 +37,8 @@ final class PhabricatorLDAPLoginController extends PhabricatorAuthController {
|
||||
|
||||
if ($request->isFormPost()) {
|
||||
try {
|
||||
$this->provider->auth($request->getStr('username'),
|
||||
$request->getStr('password'));
|
||||
|
||||
$envelope = new PhutilOpaqueEnvelope($request->getStr('password'));
|
||||
$this->provider->auth($request->getStr('username'), $envelope);
|
||||
} catch (Exception $e) {
|
||||
$errors[] = $e->getMessage();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user