Browse Source

Merge pull request #2242 from pmzqla/webui-password

Don't overwrite WebUI password when changing preferences
adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
541cc4db24
  1. 4
      src/preferences/preferences.cpp

4
src/preferences/preferences.cpp

@ -958,6 +958,10 @@ QString Preferences::getWebUiPassword() const { @@ -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…
Cancel
Save