Fix handling of malformed URLs

- Otherwise, we end up with a wrong path variable
  that causes an internal server error

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
This commit is contained in:
Michael Opdenacker 2020-03-06 12:04:39 +01:00
parent c4f3a1de5b
commit e9d970ced1

View file

@ -73,7 +73,7 @@ if m:
else:
mode = 'source'
if not search('^[A-Za-z0-9_/.,+-]*$', path):
path = 'INVALID'
status = 400
url = 'source'+path
elif cmd == 'ident':