1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merge branch 'develop' into develop-2.4

This commit is contained in:
Jeremy Stretch
2018-07-02 17:01:14 -04:00
23 changed files with 112 additions and 44 deletions

View File

@@ -27,7 +27,7 @@ def validate_rsa_key(key, is_secret=True):
raise forms.ValidationError("This looks like a private key. Please provide your public RSA key.")
try:
PKCS1_OAEP.new(key)
except:
except Exception:
raise forms.ValidationError("Error validating RSA key. Please ensure that your key supports PKCS#1 OAEP.")

View File

@@ -105,7 +105,7 @@ class UserKey(models.Model):
raise ValidationError({
'public_key': "Invalid RSA key format."
})
except:
except Exception:
raise ValidationError("Something went wrong while trying to save your key. Please ensure that you're "
"uploading a valid RSA public key in PEM format (no SSH/PGP).")