Do not allow '%' in DM password

Having '%' in DM password causes pkispawn to crash. Do not allow
users to enter it until pkispawn is fixed.

https://bugzilla.redhat.com/show_bug.cgi?id=953488
This commit is contained in:
Martin Kosek 2013-10-04 17:39:28 +02:00
parent 80886a50e6
commit 1480cf1603

View File

@ -110,7 +110,7 @@ def validate_dm_password(password):
raise ValueError("Password must only contain ASCII characters")
# Disallow characters that pkisilent doesn't process properly:
bad_characters = ' &\\<'
bad_characters = ' &\\<%'
if any(c in bad_characters for c in password):
raise ValueError('Password must not contain these characters: %s' %
', '.join('"%s"' % c for c in bad_characters))