mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 11:16:20 +03:00
Merge pull request #2242 from pmzqla/webui-password
Don't overwrite WebUI password when changing preferences
This commit is contained in:
commit
541cc4db24
1 changed files with 4 additions and 0 deletions
|
@ -958,6 +958,10 @@ QString Preferences::getWebUiPassword() const {
|
|||
}
|
||||
|
||||
void Preferences::setWebUiPassword(const QString &new_password) {
|
||||
// Do not overwrite current password with its hash
|
||||
if (new_password == getWebUiPassword())
|
||||
return;
|
||||
|
||||
// Encode to md5 and save
|
||||
QCryptographicHash md5(QCryptographicHash::Md5);
|
||||
md5.addData(new_password.toLocal8Bit());
|
||||
|
|
Loading…
Reference in a new issue