mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix coverity issue
A code path exists, where principal_obj is None. Add check principal_obj is not None to avoid dereferencing it. Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
504f441707
commit
49855ca9de
@ -780,7 +780,8 @@ class cert_request(Create, BaseCertMethod, VirtualCommand):
|
||||
"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=_(
|
||||
|
Loading…
Reference in New Issue
Block a user