#11 explain SCRAM proof mismatches and make the password visible
- Translate Prosody's "doesn't match the one we calculated" SCRAM failure into an actionable Russian message pointing at the typed password, since the client math itself is verified against the RFC 5802 test vector. - Set explicit username/password text content types on the login screen, disable smart text features, and add a password visibility toggle so users can verify what they submit. - Cover the mapping with a unit test and verify.sh invariants.
This commit is contained in:
1 parent
496ee6f0f2
commit
33702420a0
4 files changed
+53
-1
No files matched your search
@@ -37,6 +37,16 @@ final class SaslFailureMessageTests: XCTestCase {
|
||||
XCTAssertEqual(message, "Срок действия пароля истёк. Обновите пароль на сервере.")
|
||||
}
|
||||
|
||||
func testProsodyProofMismatchIsExplained() {
|
||||
let message = SaslFailureMessage.describe(
|
||||
error: SaslError.not_authorized,
|
||||
condition: "not-authorized",
|
||||
serverText: "The response provided by the client doesn't match the one we calculated")
|
||||
XCTAssertEqual(
|
||||
message,
|
||||
"Пароль не совпадает с сохранённым на сервере. Проверьте пароль (например, через значок глаза) и не используйте автозаполнение другого аккаунта.")
|
||||
}
|
||||
|
||||
func testTemporaryAuthFailureIsExplained() {
|
||||
let message = SaslFailureMessage.describe(
|
||||
error: SaslError.temporary_auth_failure, condition: nil, serverText: nil)
|
||||
|
||||
Reference in new issue
Block a user