!31 fix issue: I6QIOR dde控制中心修改密码缺陷

From: @desert-sailor 
Reviewed-by: @weidongkl 
Signed-off-by: @panchenbo
This commit is contained in:
openeuler-ci-bot 2023-04-11 09:34:45 +00:00 committed by Gitee
commit ea5f59e4e3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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} %define specrelease 1%{?dist}
%if 0%{?openeuler} %if 0%{?openeuler}
%define specrelease 1 %define specrelease 2
%endif %endif
Name: dde-control-center Name: dde-control-center
@ -12,6 +12,7 @@ URL: https://github.com/linuxdeepin/%{name}
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: 0002-hide-authorized.patch 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: gcc-c++
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
@ -61,6 +62,7 @@ Summary: %{summary}
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1
sed -i 's|lrelease|lrelease-qt5|' translate_generation.sh sed -i 's|lrelease|lrelease-qt5|' translate_generation.sh
sed -i -E '/add_compile_definitions/d' CMakeLists.txt sed -i -E '/add_compile_definitions/d' CMakeLists.txt
@ -111,6 +113,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop ||:
%{_libdir}/cmake/DdeControlCenter/ %{_libdir}/cmake/DdeControlCenter/
%changelog %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 * Mon Apr 10 2023 liweiganga <liweiganga@uniontech.com> - 5.4.85.4-1
- update: update to 5.4.85.4 - update: update to 5.4.85.4