Merge pull request #3137 from quay/joseph.schorr/QUAY-963/repo-name-check

Ensure that we limit the length of repository names
This commit is contained in:
Joseph Schorr 2018-07-15 19:17:40 +03:00 committed by GitHub
commit 6c3cf403bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 7 deletions

View file

@ -5,7 +5,7 @@ import anunidecode # Don't listen to pylint's lies. This import is required for
from uuid import uuid4
REPOSITORY_NAME_REGEX = re.compile(r'^[\.a-zA-Z0-9_-]+$')
REPOSITORY_NAME_REGEX = re.compile(r'^[\.a-zA-Z0-9_-]{1,255}$')
VALID_TAG_PATTERN = r'[\w][\w.-]{0,127}'
FULL_TAG_PATTERN = r'^[\w][\w.-]{0,127}$'