mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-04 23:32:55 +08:00
fix(auth): Skip further decryption if encrypted password fails to decrypt
this should only occur if the wrong RSA key is used on the client, otherwise the patch probably forgot to set `is_crypto` to false
This commit is contained in:
parent
446e994ff0
commit
4ced11d567
@ -112,7 +112,13 @@ public final class DefaultAuthenticators {
|
||||
cipher.doFinal(Utils.base64Decode(request.getPasswordRequest().password)),
|
||||
StandardCharsets.UTF_8);
|
||||
} catch (Exception ignored) {
|
||||
decryptedPassword = request.getPasswordRequest().password;
|
||||
if (requestData.is_crypto) {
|
||||
response.retcode = -201;
|
||||
response.message = translate("messages.dispatch.account.password_crypto_error");
|
||||
return response;
|
||||
} else {
|
||||
decryptedPassword = request.getPasswordRequest().password;
|
||||
}
|
||||
}
|
||||
|
||||
if (decryptedPassword == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user