mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 22:14:32 +00:00
Merge pull request #2242 from pmzqla/webui-password
Don't overwrite WebUI password when changing preferences
This commit is contained in:
commit
541cc4db24
@ -958,6 +958,10 @@ QString Preferences::getWebUiPassword() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setWebUiPassword(const QString &new_password) {
|
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
|
// Encode to md5 and save
|
||||||
QCryptographicHash md5(QCryptographicHash::Md5);
|
QCryptographicHash md5(QCryptographicHash::Md5);
|
||||||
md5.addData(new_password.toLocal8Bit());
|
md5.addData(new_password.toLocal8Bit());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user