mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
use hashed passwords in all commands (#4493)
* protocol changes * server changes * client changes for password reset and registration * add hashed password to change password in client * always use hashed password to log in * add warning to client when using plain text password * require real password for changing email on server this is backwards compatible as users logged in with a real password on older clients will not need this, only users logged in with a hashed password * implement password dialog when changing email * require min password length * use qstringlist to build query instead * use clear instead of = "" * add max to password dialog * use proper const ness in abstractclient * reject too long passwords instead of trimming
This commit is contained in:
parent
fcafcb340a
commit
2fc85e0c08
17 changed files with 330 additions and 96 deletions
|
|
@ -98,6 +98,7 @@ public:
|
|||
bool registerUser(const QString &userName,
|
||||
const QString &realName,
|
||||
const QString &password,
|
||||
bool passwordNeedsHash,
|
||||
const QString &emailAddress,
|
||||
const QString &country,
|
||||
bool active = false);
|
||||
|
|
@ -111,8 +112,12 @@ public:
|
|||
LogMessage_TargetType targetType,
|
||||
const int targetId,
|
||||
const QString &targetName);
|
||||
bool
|
||||
changeUserPassword(const QString &user, const QString &oldPassword, const QString &newPassword, const bool &force);
|
||||
bool changeUserPassword(const QString &user, const QString &password, bool passwordNeedsHash);
|
||||
bool changeUserPassword(const QString &user,
|
||||
const QString &oldPassword,
|
||||
bool oldPasswordNeedsHash,
|
||||
const QString &newPassword,
|
||||
bool newPasswordNeedsHash);
|
||||
QList<ServerInfo_Ban> getUserBanHistory(const QString userName);
|
||||
bool
|
||||
addWarning(const QString userName, const QString adminName, const QString warningReason, const QString clientID);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue