summaryrefslogtreecommitdiffstats
path: root/textw/userauth_text.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-12-15 10:56:44 -0500
committerChris Lumens <clumens@redhat.com>2008-12-15 10:56:44 -0500
commite0cbcf83ffcfd3daf9f668b93caf48491a1b5091 (patch)
tree3a4040f9f486e97de6dee27d2eb99e9914fa3e6b /textw/userauth_text.py
parente1c31e881c8dd6e33de43758b143eccf8300fb1c (diff)
downloadanaconda-e0cbcf83ffcfd3daf9f668b93caf48491a1b5091.tar.gz
anaconda-e0cbcf83ffcfd3daf9f668b93caf48491a1b5091.tar.xz
anaconda-e0cbcf83ffcfd3daf9f668b93caf48491a1b5091.zip
cracklib now raises exceptions on bad passwords (rzhou, #476312).
Diffstat (limited to 'textw/userauth_text.py')
-rw-r--r--textw/userauth_text.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/textw/userauth_text.py b/textw/userauth_text.py
index 152a1c620..84966e954 100644
--- a/textw/userauth_text.py
+++ b/textw/userauth_text.py
@@ -76,8 +76,10 @@ class RootPasswordWindow:
"which are not allowed."),
buttons = [ TEXT_OK_BUTTON ], width = 50)
else:
- msg = gettext.ldgettext("cracklib", cracklib.FascistCheck(entry1.value()))
- if msg is not None:
+ try:
+ cracklib.FascistCheck(entry1.value())
+ except ValueError, e:
+ msg = gettext.ldgettext("cracklib", e)
ret = anaconda.intf.messageWindow(_("Weak Password"),
_("Weak password provided: %s\n\n"
"Would you like to continue with this password?"