bugfix-for-no-check-newpassword-at-modifypwd

This commit is contained in:
desert-sailor 2023-04-11 11:08:41 +08:00
parent 880ac1a3ef
commit deac1e28a5
2 changed files with 45 additions and 2 deletions

View File

@ -0,0 +1,38 @@
From 53dfbe39bdc60a54a7f6cd03fb4f4687c7c5d6ac Mon Sep 17 00:00:00 2001
From: desert-sailor <dxwangk@isoftstone.com>
Date: Tue, 11 Apr 2023 10:51:39 +0800
Subject: [PATCH] [PATCH] bugfix for issue:I6QIOR modify passwd no check
newpassword
---
.../window/modules/accounts/modifypasswdpage.cpp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/frame/window/modules/accounts/modifypasswdpage.cpp b/src/frame/window/modules/accounts/modifypasswdpage.cpp
index ff33149..e2f9d77 100644
--- a/src/frame/window/modules/accounts/modifypasswdpage.cpp
+++ b/src/frame/window/modules/accounts/modifypasswdpage.cpp
@@ -157,6 +157,20 @@ void ModifyPasswdPage::clickSaveBtn()
{
//校验输入密码
if (judgeTextEmpty(m_oldPasswordEdit)) return;
+ if (judgeTextEmpty(m_newPasswordEdit)) return;
+
+ if (m_newPasswordEdit->lineEdit()->text() == m_oldPasswordEdit->lineEdit()->text() ) {
+ m_newPasswordEdit->setAlert(true);
+ m_newPasswordEdit->showAlertMessage(tr("New password should differ from the current one"), m_oldPasswordEdit, 2000);
+ return;
+ }
+
+ if (judgeTextEmpty(m_repeatPasswordEdit)) return;
+ if (m_newPasswordEdit->lineEdit()->text() != m_repeatPasswordEdit->lineEdit()->text()) {
+ m_repeatPasswordEdit->setAlert(true);
+ m_repeatPasswordEdit->showAlertMessage(tr("Passwords do not match"), m_repeatPasswordEdit, 2000);
+ return;
+ }
Q_EMIT requestChangePassword(m_curUser, m_oldPasswordEdit->lineEdit()->text(), m_newPasswordEdit->lineEdit()->text(), m_repeatPasswordEdit->lineEdit()->text());
}
--
2.33.0

View File

@ -1,6 +1,6 @@
%define specrelease 1%{?dist}
%if 0%{?openeuler}
%define specrelease 1
%define specrelease 2
%endif
Name: dde-control-center
@ -11,7 +11,8 @@ License: GPLv3
URL: https://github.com/linuxdeepin/%{name}
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: 0002-hide-authorized.patch
Patch1: 0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch
Patch1: 0001-dde-control-center-uos-fix-modify-eulerServerEnduserAgreement_new-path.patch
Patch2: 0003-bugfix-for-no-check-newpassword-at-modifypwd.patch
BuildRequires: gcc-c++
BuildRequires: desktop-file-utils
@ -61,6 +62,7 @@ Summary: %{summary}
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
sed -i 's|lrelease|lrelease-qt5|' translate_generation.sh
sed -i -E '/add_compile_definitions/d' CMakeLists.txt
@ -111,6 +113,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop ||:
%{_libdir}/cmake/DdeControlCenter/
%changelog
* Tue Apr 11 2023 Dongxing Wang <dxwangk@isoftstone.com> - 5.4.85.4-2
- fix: issue#I6QIOR bugfix-for-no-check-newpassword-at-modifypwd
* Mon Apr 10 2023 liweiganga <liweiganga@uniontech.com> - 5.4.85.4-1
- update: update to 5.4.85.4