mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03: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:
parent
b1b3a5879f
commit
49d689fdb2
@ -214,8 +214,8 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique):
|
||||
|
||||
# Sanity check: We may potentially receive a full PEM certificate,
|
||||
# and we want to accept these.
|
||||
cert_begin_re = r'^(-{4,})\s*BEGIN\s+CERTIFICATE\s*(-{4,})'
|
||||
cert_end_re = r'^(-{4,})\s*END\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_begin_match = re.search(cert_begin_re, data)
|
||||
if cert_begin_match:
|
||||
cert_end_match = re.search(cert_end_re, data)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user