1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00
phorge-phorge/scripts
epriestley bc71888249 Mask typed passwords as they are entered into 'accountadmin'
Summary:
Currently, we echo the password as the user types it. This turns out to be a bit
of an issue in over-the-shoulder installs. Instead, disable tty echo while the
user is typing their password so nothing is shown (like how 'sudo' works).

Also show a better error message if the user chooses a duplicate email; without
testing for this we just throw a duplicate key exception when saving, which
isn't easy to understand. The other duplicate key exception is duplicate
username, which is impossible (the script updates rather than creating in this
case).

There's currently a bug where creating a user and setting their password at the
same time doesn't work. This is because we hash the PHID into the password hash,
but it's empty if the user hasn't been persisted yet. Make sure the user is
persisted before setting their password.

Finally, fix an issue where $original would have the new username set, creating
a somewhat confusing summary at the end.

I'm also going to improve the password behavior/explanation here once I add
welcome emails ("Hi Joe, epriestley created an account for you on Phabricator,
click here to login...").

Test Plan:
- Typed a password and didn't have it echoed. I also tested this on Ubuntu
without encountering problems.
  - Chose a duplicate email, got a useful error message instead of the exception
I'd encountered earlier.
  - Created a new user with a password in one pass and logged in as that user,
this worked properly.
  - Verified summary table does not contain username for new users.

Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran
CC: moskov, jr, aran, jungejason
Differential Revision: 358
2011-05-28 11:52:59 -07:00
..
daemon Move 'phd parse-commit' to a dedicated script; allow message parsing tasks to 2011-04-02 13:23:22 -07:00
mail Fix a small inbound email glitch 2011-05-05 16:13:15 -07:00
repository Update Phabricator to new PhutilServiceProfiler APIs 2011-05-16 17:10:18 -07:00
search Rought cut of search. 2011-02-14 15:34:20 -08:00
sql Add a "setup" mode which guides new users through application configuration 2011-05-10 15:12:30 -07:00
user Mask typed passwords as they are entered into 'accountadmin' 2011-05-28 11:52:59 -07:00
__init_env__.php Fix a small inbound email glitch 2011-05-05 16:13:15 -07:00
__init_script__.php Ensure syntax errors and other configuration problems are surfaced to the user. 2011-05-27 16:59:21 -07:00
celerity_mapper.php Allow Celerity to return "304 Not Modified" responses 2011-05-10 14:33:11 -07:00