Răsfoiți Sursa

Improve comments and error message on invalid characters in URL

Sander Steffann 6 ani în urmă
părinte
comite
8d92089487
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      netbox/netbox/settings.py

+ 2 - 1
netbox/netbox/settings.py

@@ -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: