mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Fix /pic/ exploit
This commit is contained in:
parent
a45227b883
commit
33dd9b6668
1 changed files with 4 additions and 0 deletions
|
|
@ -93,6 +93,8 @@ proc createMediaRouter*(cfg: Config) =
|
|||
|
||||
get re"^\/pic\/orig\/(enc)?\/?(.+)":
|
||||
var url = decoded(request, 1)
|
||||
cond "amplify_video" notin url
|
||||
|
||||
if "twimg.com" notin url:
|
||||
url.insert(twimg)
|
||||
if not url.startsWith(https):
|
||||
|
|
@ -107,6 +109,8 @@ proc createMediaRouter*(cfg: Config) =
|
|||
|
||||
get re"^\/pic\/(enc)?\/?(.+)":
|
||||
var url = decoded(request, 1)
|
||||
cond "amplify_video" notin url
|
||||
|
||||
if "twimg.com" notin url:
|
||||
url.insert(twimg)
|
||||
if not url.startsWith(https):
|
||||
|
|
|
|||
Loading…
Reference in a new issue