mirror of
https://github.com/zedeus/nitter.git
synced 2026-03-04 13:19:57 -05:00
Fix /pic/ exploit
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user