mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-24 10:23:02 -07:00
[Security] Refuse KDF downgrade; trim profile name and warn on silent credential drop
This commit is contained in:
parent
4252f69d2b
commit
e20846a88d
3 changed files with 20 additions and 1 deletions
|
|
@ -151,6 +151,11 @@ void ServersSettings::setServerPassword(const QString &saveName, const QString &
|
|||
const int index = getPrevioushostindex(saveName);
|
||||
if (index >= 0) {
|
||||
setValue(password, QString("password%1").arg(index), "server", "server_details");
|
||||
} else {
|
||||
// A credential write that silently no-ops is hard to diagnose from a
|
||||
// bug report; surface a mismatched profile name instead.
|
||||
qCWarning(ServersSettingsLog) << "setServerPassword() could not find profile:" << saveName
|
||||
<< "- password not saved";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue