Skip to content
Snippets Groups Projects
Commit 9455a902 authored by Roman Karwacik's avatar Roman Karwacik
Browse files

Merge branch 'authbypass' into 'master'

Fixed authentication bypass

See merge request videoaginfra/website!40
parents 120e3e71 4d0005a4
No related branches found
No related tags found
No related merge requests found
...@@ -431,7 +431,8 @@ def auth(): #pylint: disable=too-many-branches ...@@ -431,7 +431,8 @@ def auth(): #pylint: disable=too-many-branches
cookie = int(request.cookies['tracking']) cookie = int(request.cookies['tracking'])
else: else:
cookie = random.getrandbits(8*8-1) cookie = random.getrandbits(8*8-1)
if url.endswith('jpg') or ismod(): url_path = urllib.parse.urlparse(url).path
if url_path.endswith('jpg') or ismod():
return "OK", 200 return "OK", 200
if url.startswith('pub/hls/'): if url.startswith('pub/hls/'):
handle = url[len('pub/hls/'):].split('_')[0].split('.')[0] handle = url[len('pub/hls/'):].split('_')[0].split('.')[0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment