Simple HTTP auth (#372)

HTTP Basic Auth form validation
This commit is contained in:
dgtlmoon
2022-01-15 22:52:39 +01:00
committed by GitHub
parent e5fe095f16
commit a896493797
4 changed files with 69 additions and 2 deletions

View File

@@ -628,6 +628,7 @@ def changedetection_app(config=None, datastore_o=None):
urls = request.values.get('urls').split("\n")
for url in urls:
url = url.strip()
# Flask wtform validators wont work with basic auth, use validators package
if len(url) and validators.url(url):
new_uuid = datastore.add_watch(url=url.strip(), tag="")
# Straight into the queue.