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:
@@ -166,7 +166,8 @@ $user->openTransaction();
|
||||
$editor->makeAdminUser($user, $set_admin);
|
||||
|
||||
if ($changed_pass !== false) {
|
||||
$editor->changePassword($user, $changed_pass);
|
||||
$envelope = new PhutilOpaqueEnvelope($changed_pass);
|
||||
$editor->changePassword($user, $envelope);
|
||||
}
|
||||
|
||||
$user->saveTransaction();
|
||||
|
||||
Reference in New Issue
Block a user