Add repo name check to V2

Fixes #592
This commit is contained in:
Joseph Schorr 2015-10-05 14:19:52 -04:00
parent 16c0d19934
commit f393236c9f
3 changed files with 17 additions and 4 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)