use str() - not repr() - for invalid SSH cert error messages

see: #6417
This commit is contained in:
Ryan Petrello 2017-06-06 13:52:07 -04:00
parent b1d4c44c51
commit 9445fed340

View File

@ -57,7 +57,7 @@ def validate_pem(data, min_keys=0, max_keys=None, min_certs=0, max_certs=None):
while data:
match = pem_obj_re.match(data)
if not match:
raise ValidationError(_('Invalid certificate or key: %r...') % data[:100])
raise ValidationError(_('Invalid certificate or key: %s...') % data[:100])
data = match.group(4).lstrip()
# Check PEM object type, check key type if private key.