1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:27:45 +00:00

LibCore: Make Account::authenticate take a SecretString

To encourage users to use the SecretString API, change the API so that
Account::authenticate only accepts a SecretString.
This commit is contained in:
Brian Gianforcaro 2021-09-12 07:02:17 -07:00 committed by Andreas Kling
parent 9e667453c7
commit df04283d61
5 changed files with 7 additions and 6 deletions

View file

@ -90,7 +90,7 @@ int main(int argc, char** argv)
return 1;
}
if (!target_account.authenticate(current_password.value().characters())) {
if (!target_account.authenticate(current_password.value())) {
warnln("Incorrect or disabled password.");
warnln("Password for user {} unchanged.", target_account.username());
return 1;

View file

@ -55,7 +55,7 @@ int main(int argc, char** argv)
}
auto const& password = password_or_error.value();
if (!account.authenticate(password.characters())) {
if (!account.authenticate(password)) {
warnln("Incorrect or disabled password.");
return 1;
}

View file

@ -58,7 +58,7 @@ int main(int argc, char** argv)
return 1;
}
if (!account.authenticate(password.value().characters())) {
if (!account.authenticate(password.value())) {
warnln("Incorrect or disabled password.");
return 1;
}