URL: https://github.com/freeipa/freeipa/pull/392 Author: tomaskrizek Title: #392: Fix coverity issue Action: opened
PR body: """ """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/392/head:pr392 git checkout pr392
From 83ce37eaf66fdb6d93e647af95cbc4be577d5382 Mon Sep 17 00:00:00 2001 From: Tomas Krizek <tkri...@redhat.com> Date: Thu, 12 Jan 2017 10:49:12 +0100 Subject: [PATCH] Fix coverity issue --- ipaserver/plugins/cert.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipaserver/plugins/cert.py b/ipaserver/plugins/cert.py index cc47084..d8bfc1c 100644 --- a/ipaserver/plugins/cert.py +++ b/ipaserver/plugins/cert.py @@ -780,7 +780,8 @@ def execute(self, csr, all=False, raw=False, **kw): "match requested principal") % gn.name) elif isinstance(gn, cryptography.x509.general_name.RFC822Name): if principal_type == USER: - if gn.value not in principal_obj.get('mail', []): + if principal_obj and gn.value not in principal_obj.get( + 'mail', []): 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