1 Star 0 Fork 22

大漠行舟/dde-control-center

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0003-bugfix-for-no-check-newpassword-at-modifypwd.patch 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/desert-sailor/dde-control-center.git
git@gitee.com:desert-sailor/dde-control-center.git
desert-sailor
dde-control-center
dde-control-center
master

搜索帮助