URL: https://github.com/freeipa/freeipa/pull/435
Author: MartinBasti
 Title: #435: py3: cert.py: create principal object from string
Action: opened

PR body:
"""
Principal object must be created from string not from bytes

https://fedorahosted.org/freeipa/ticket/4985
https://fedorahosted.org/freeipa/ticket/6640
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/435/head:pr435
git checkout pr435
From 75b8399e8075be666e074a7161f1c10079ff4c08 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Mon, 6 Feb 2017 12:14:38 +0100
Subject: [PATCH] py3: cert.py: create principal object from string

Principal object must be created from string not from bytes

https://fedorahosted.org/freeipa/ticket/4985
https://fedorahosted.org/freeipa/ticket/6640
---
 ipaserver/plugins/cert.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipaserver/plugins/cert.py b/ipaserver/plugins/cert.py
index 5bf4cfb..fb35c2d 100644
--- a/ipaserver/plugins/cert.py
+++ b/ipaserver/plugins/cert.py
@@ -772,7 +772,7 @@ def execute(self, csr, all=False, raw=False, **kw):
                         principal_obj['krbprincipalname'] = [
                             kerberos.Principal((u'krbtgt', realm), realm)]
                 if not _principal_name_matches_principal(
-                        gn.name, principal_obj):
+                        gn.name.decode('utf-8'), principal_obj):
                     raise errors.ValidationError(
                         name='csr',
                         error=_(
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to