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:
epriestley
2012-07-17 12:06:33 -07:00
parent ae2e73ce80
commit dd70c59465
8 changed files with 50 additions and 31 deletions

View File

@@ -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();