anaconda/bugfix-fix-password-policy.patch

56 lines
2.6 KiB
Diff
Raw Normal View History

2020-09-04 09:13:25 +08:00
From 1f703640773f49e4610baee9afd79b89c3c4bc1c Mon Sep 17 00:00:00 2001
From: zhangqiumiao <zhangqiumiao1@huawei.com>
Date: Thu, 3 Sep 2020 21:48:20 +0800
Subject: [PATCH] bugfix fix password policy
---
data/interactive-defaults.ks | 4 ++--
pyanaconda/ui/gui/spokes/root_password.py | 2 +-
pyanaconda/ui/gui/spokes/user.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/data/interactive-defaults.ks b/data/interactive-defaults.ks
index 0177cf9..7eac690 100644
--- a/data/interactive-defaults.ks
+++ b/data/interactive-defaults.ks
@@ -4,8 +4,8 @@ firstboot --enable
%anaconda
# Default password policies
-pwpolicy root --notstrict --minlen=8 --minquality=1 --nochanges --notempty
-pwpolicy user --notstrict --minlen=8 --minquality=1 --nochanges --emptyok
+pwpolicy root --notstrict --minlen=8 --minquality=1 --nochanges --notempty --strict
+pwpolicy user --notstrict --minlen=8 --minquality=1 --nochanges --emptyok --strict
pwpolicy luks --notstrict --minlen=8 --minquality=1 --nochanges --notempty
# NOTE: This applies only to *fully* interactive installations, partial kickstart
# installations use defaults specified in pyanaconda/pwpolicy.py.
diff --git a/pyanaconda/ui/gui/spokes/root_password.py b/pyanaconda/ui/gui/spokes/root_password.py
index 2af9111..d609453 100644
--- a/pyanaconda/ui/gui/spokes/root_password.py
+++ b/pyanaconda/ui/gui/spokes/root_password.py
@@ -292,7 +292,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler)
self.needs_waiver = False
else:
if not self._validity_check.result.success:
- self.can_go_back = False
+ self.can_go_back = True
self.needs_waiver = True
elif not self._ascii_check.result.success:
self.can_go_back = True
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index 29e60cb..82fbdc8 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -673,7 +673,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler):
if not self._confirm_check.result.success:
self.can_go_back = False
if not self._validity_check.result.success:
- self.can_go_back = False
+ self.can_go_back = True
self.needs_waiver = True
elif not self._ascii_check.result.success:
self.can_go_back = True
--
1.8.3.1