mirror of
https://github.com/safishamsi/graphify.git
synced 2026-10-28 17:47:02 +00:00
fix(security): reject embedded URL credentials
(cherry picked from commit 2fac78e8ed)
This commit is contained in:
1 parent
52dea94b01
commit
822fbb04c2
1 file changed
+3
@@ -115,6 +115,9 @@ def validate_url(url: str) -> str:
|
||||
f"Got: {url!r}"
|
||||
)
|
||||
|
||||
if parsed.username is not None or parsed.password is not None:
|
||||
raise ValueError(f"Blocked URL containing embedded credentials. Got: {url!r}")
|
||||
|
||||
try:
|
||||
port = parsed.port
|
||||
except ValueError as exc:
|
||||
|
||||
Reference in new issue
Block a user