Repository navigation
Conversation
…d is wrong When an administrator has disabled sign-in, the sign-in page tells everyone else "Username and password not recognized", because any unauthenticated answer that is not a reCAPTCHA failure is treated as a wrong password. The page now shows that signing in is disabled when the response carries isLoginDisabled, which the backend sends once it refuses the sign-in with a JSON body instead of a redirect. The same message is shown when the page is opened with ?loginDisabled=true, so a session signed out because sign-in was disabled can be told why.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an administrator disables sign-in, everyone else who signs in with the correct password is told "Username and password not recognized. Please try again."
LoginHomeComponent.login()treats any unauthenticated answer that is not a reCAPTCHA failure as a wrong password.People who are told their password is wrong tend to retry, reset it, or ask their teacher for a new one, none of which helps while the site is closed.
Changes
isLoginDisabled, the page shows "Signing in is disabled right now. Please try again later." instead of the password error. WISE-API#369 makes the backend send that response; today it redirects to a page that does not exist.?loginDisabled=true, which is where a session that is signed out because sign-in was disabled is sent by WISE-Client#2382. The new string is added tomessages.xlf.Test
login-home.component.spec.ts: a sign-in answered with{"status":"error","isLoginDisabled":true}, and the page opened with?loginDisabled=true, both show only the sign-in disabled message. Against the currentdevelopthe first fails withExpected $[0] = 'Username and password not recognized. Please try again.' to equal 'Signing in is disabled right now. Please try again later.'.src/app/loginanduser.service.spec.tspass.