Page MenuHomePhabricator

If user is granted "admin" rights their pwd length requirement rises to 8 characters - show pwd change interface with appropriate message (now showing temp pwd message)
Closed, DeclinedPublic

Description

Background:

Non admin's min pwd character limit is 1.

Admin's min pwd character limit is 8.


Problem:
The app is showing the change pwd interface in the case a user newly granted admin tries to log in, but the error message box says:

"You logged in with a temp pwd...".

However, the error message back from the server is...

"Your password is not valid: Passwords must be at least 8 characters. Please choose a new password now, or click 'Skip' to reset it later."

...which isn't perfect as it refers to a "Skip" button which doesn't exist.


Repro:

I created a personal acct on https://en.wikipedia.beta.wmflabs.org then used the following steps to grant that account "bureaucrat" (which means *it* can grant other accts "admin" rights).

  • I ssh'ed into "deployment-tin.deployment-prep.eqiad.wmflabs"
  • I ran "mwscript createAndPromote.php --wiki=enwiki --bureaucrat --force MYACCOUNTUSERNAME"

Then while logged in to my personal account on beta labs I was able to use my personal acct to grant a testing account administrator rights via:
https://en.wikipedia.beta.wmflabs.org/wiki/Special:UserRights/Acct_creation_test_001 ("Acct_creation_test_001" was the testing account)

Related:
https://www.mediawiki.org/wiki/API:Login#clientlogin
https://www.mediawiki.org/wiki/Manual:CreateAndPromote.php

Event Timeline

Mhurd updated the task description. (Show Details)

Reminder - the api doesn't seem to give us any sort of error key or type which would specifically let us know that this password change prompt is character length related (beside the error message string itself - and we can't use that message because it's referencing an interface element which doesn't exist on the app - the "Skip" button.) So may need to actually check that message and have WMFAccountLogin return a different error type if it sees "8 characters"... right now it returns ".temporaryPasswordNeedsChange" but we'll probably want something like "".passwordLengthNeedsIncreaseTo8CharactersMinimum".

Mhurd updated the task description. (Show Details)
JMinor raised the priority of this task from Lowest to Low.May 24 2017, 9:46 PM