Add a check to ensure repository names are valid according to an extended set of rules.

Fixes #534
This commit is contained in:
Joseph Schorr 2015-09-24 11:42:56 -04:00
parent ee836da1e3
commit a283c8d8ec
5 changed files with 36 additions and 3 deletions

View file

@ -1,8 +1,10 @@
import urllib
import re
from functools import wraps
from uuid import uuid4
REPOSITORY_NAME_REGEX = re.compile(r'^[\.a-zA-Z0-9_-]+$')
def parse_namespace_repository(repository, include_tag=False):
parts = repository.rstrip('/').split('/', 1)