URL: https://github.com/freeipa/freeipa/pull/985
Author: stlaz
 Title: #985: py3: fix caless to CA promotion on replica
Action: opened

PR body:
"""
https://pagure.io/freeipa/issue/4985

---------

Encountered this problem when trying to promote CA-less replica to CA-full, may 
happen on CA-less master as well although I did not investigate that.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/985/head:pr985
git checkout pr985
From 5e58e69a459447b1f5ee2ea241aa501217c7b0fe Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Fri, 18 Aug 2017 10:25:51 +0200
Subject: [PATCH] py3: fix caless to CA promotion on replica

https://pagure.io/freeipa/issue/4985
---
 ipaserver/install/ca.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ipaserver/install/ca.py b/ipaserver/install/ca.py
index c68390e7ed..1f295f73a4 100644
--- a/ipaserver/install/ca.py
+++ b/ipaserver/install/ca.py
@@ -54,7 +54,10 @@
 
 
 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:
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org

Reply via email to