Improve comments and error message on invalid characters in URL

This commit is contained in:
Sander Steffann 2020-02-27 18:18:05 +01:00
parent 3a0849699f
commit 8d92089487

View File

@ -324,8 +324,9 @@ if UPDATE_REPO_URL:
"'https://api.github.com/repos/<owner>/<repository>'"
)
# Don't allow ? (query) and # (fragment) in the URL
if query or fragment:
raise ImproperlyConfigured("UPDATE_REPO_URL may not contain a query or fragment")
raise ImproperlyConfigured("UPDATE_REPO_URL may not contain a ? (query) or # (fragment)")
# Enforce a cache timeout of at least an hour to protect GitHub
if UPDATE_CACHE_TIMEOUT < 3600: