mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 13:39:27 -02:30
Fix cert regex.
This makes the certificate not have to be at the beginning of the regex for the SSH key.
This commit is contained in:
@@ -214,8 +214,8 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique):
|
|||||||
|
|
||||||
# Sanity check: We may potentially receive a full PEM certificate,
|
# Sanity check: We may potentially receive a full PEM certificate,
|
||||||
# and we want to accept these.
|
# and we want to accept these.
|
||||||
cert_begin_re = r'^(-{4,})\s*BEGIN\s+CERTIFICATE\s*(-{4,})'
|
cert_begin_re = r'(-{4,})\s*BEGIN\s+CERTIFICATE\s*(-{4,})'
|
||||||
cert_end_re = r'^(-{4,})\s*END\s+CERTIFICATE\s*(-{4,})'
|
cert_end_re = r'(-{4,})\s*END\s+CERTIFICATE\s*(-{4,})'
|
||||||
cert_begin_match = re.search(cert_begin_re, data)
|
cert_begin_match = re.search(cert_begin_re, data)
|
||||||
if cert_begin_match:
|
if cert_begin_match:
|
||||||
cert_end_match = re.search(cert_end_re, data)
|
cert_end_match = re.search(cert_end_re, data)
|
||||||
|
|||||||
Reference in New Issue
Block a user