mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 08:16:16 -07:00
BUGFIX: Added length restriction on UI lock password
This commit is contained in:
parent
8a07e01181
commit
df64ede724
35 changed files with 1088 additions and 912 deletions
|
@ -376,6 +376,11 @@ void MainWindow::defineUILockPassword() {
|
|||
bool ok = false;
|
||||
QString new_clear_password = QInputDialog::getText(this, tr("UI lock password"), tr("Please type the UI lock password:"), QLineEdit::Password, old_pass_md5, &ok);
|
||||
if(ok) {
|
||||
new_clear_password = new_clear_password.trimmed();
|
||||
if(new_clear_password.size() < 3) {
|
||||
QMessageBox::warning(this, tr("Invalid password"), tr("The password should contain at least 3 characters"));
|
||||
return;
|
||||
}
|
||||
if(new_clear_password != old_pass_md5) {
|
||||
Preferences().setUILockPassword(new_clear_password);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue