py3: fix caless to CA promotion on replica

https://pagure.io/freeipa/issue/4985

Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
Stanislav Laznicka 2017-08-18 10:25:51 +02:00 committed by Pavel Vomacka
parent 928374ca7d
commit 2151ab02c1

View File

@ -54,7 +54,10 @@ external_ca_file = None
def subject_validator(valid_attrs, value):
v = unicode(value, 'utf-8')
if not isinstance(value, unicode):
v = unicode(value, 'utf-8')
else:
v = value
if any(ord(c) < 0x20 for c in v):
raise ValueError("must not contain control characters")
if '&' in v: