mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Client] Report password-reset rate limits instead of a generic failure (#7677)
* [Client] Report password-reset rate limits instead of a generic failure sigForgotPasswordError carried no response code, so rate limiting, a disabled reset feature, an unknown user and a bad token all produced "contact the server operator". Users who were only rate limited retried, which kept them rate limited. * [Client] Move the reset-password warning out of the response switch --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
a83d82b5e8
commit
d89b502342
4 changed files with 36 additions and 12 deletions
|
|
@ -837,7 +837,7 @@ void RemoteClient::requestForgotPasswordResponse(const Response &response)
|
|||
emit sigPromptForForgotPasswordReset();
|
||||
}
|
||||
} else {
|
||||
emit sigForgotPasswordError();
|
||||
emit sigForgotPasswordError(response.response_code());
|
||||
}
|
||||
|
||||
doDisconnectFromServer();
|
||||
|
|
@ -873,7 +873,7 @@ void RemoteClient::submitForgotPasswordResetResponse(const Response &response)
|
|||
derivedVerifier.clear();
|
||||
}
|
||||
} else {
|
||||
emit sigForgotPasswordError();
|
||||
emit sigForgotPasswordError(response.response_code());
|
||||
}
|
||||
|
||||
doDisconnectFromServer();
|
||||
|
|
@ -908,7 +908,7 @@ void RemoteClient::submitForgotPasswordChallengeResponse(const Response &respons
|
|||
if (response.response_code() == Response::RespOk) {
|
||||
emit sigPromptForForgotPasswordReset();
|
||||
} else {
|
||||
emit sigForgotPasswordError();
|
||||
emit sigForgotPasswordError(response.response_code());
|
||||
}
|
||||
|
||||
doDisconnectFromServer();
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ signals:
|
|||
void notifyUserAboutUpdate();
|
||||
void sigRequestForgotPasswordToServer(const QString &hostname, unsigned int port, const QString &_userName);
|
||||
void sigForgotPasswordSuccess();
|
||||
void sigForgotPasswordError();
|
||||
void sigForgotPasswordError(int responseCode);
|
||||
void sigPromptForForgotPasswordReset();
|
||||
void sigSubmitForgotPasswordResetToServer(const QString &hostname,
|
||||
unsigned int port,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue