1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 15:27:54 +00:00

Merge pull request #2242 from pmzqla/webui-password

Don't overwrite WebUI password when changing preferences
This commit is contained in:
sledgehammer999 2014-12-05 12:12:41 +02:00
commit 541cc4db24

View File

@ -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());