зеркало из https://github.com/nextcloud/appstore.git
Merge pull request #386 from nextcloud/some-minor-fixes
Some minor fixes
This commit is contained in:
Коммит
42f1f40ca7
|
@ -115,4 +115,8 @@ class CertificateValidator:
|
|||
raise CertificateAppIdMismatchException(msg)
|
||||
|
||||
def _to_cert(self, certificate: str) -> X509:
|
||||
return load_certificate(FILETYPE_PEM, certificate.encode())
|
||||
try:
|
||||
return load_certificate(FILETYPE_PEM, certificate.encode())
|
||||
except Exception as e:
|
||||
msg = '%s: %s' % ('Invalid certificate', str(e))
|
||||
raise InvalidCertificateException(msg)
|
||||
|
|
|
@ -22,7 +22,7 @@ def get_versions():
|
|||
|
||||
|
||||
def validate_id(input: str) -> str:
|
||||
regex = r'^([A-Z][a-z]+)+$'
|
||||
regex = r'^([A-Z][a-z]*)+$'
|
||||
if not re.match(regex, input):
|
||||
raise ValidationError(_('The app name must be camel case e.g. MyApp'))
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче