From fd2399f702cb7a58d4d50009ea86e283efa93172 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 18 Aug 2020 12:46:27 +0200 Subject: [PATCH] [users] Re-check password validity on change of conditions - if the user password is reused (or not) then check the status of the passwords against the new reuse-setting - if the allow-weak-passwords setting is changed, then check the status of passwords (both of them) against the new weakness setting --- src/modules/users/Config.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp index 102d26917..80c612171 100644 --- a/src/modules/users/Config.cpp +++ b/src/modules/users/Config.cpp @@ -381,6 +381,10 @@ Config::setReuseUserPasswordForRoot( bool reuse ) { m_reuseUserPasswordForRoot = reuse; emit reuseUserPasswordForRootChanged( reuse ); + { + auto rp = rootPasswordStatus(); + emit rootPasswordStatusChanged( rp.first, rp.second ); + } } } @@ -391,6 +395,14 @@ Config::setRequireStrongPasswords( bool strong ) { m_requireStrongPasswords = strong; emit requireStrongPasswordsChanged( strong ); + { + auto rp = rootPasswordStatus(); + emit rootPasswordStatusChanged( rp.first, rp.second ); + } + { + auto up = userPasswordStatus(); + emit userPasswordStatusChanged( up.first, up.second ); + } } }