fix: harden sing-box egress rollout
This commit is contained in:
@@ -122,6 +122,8 @@ def parse_hysteria2_uri(raw_uri: str) -> Hy2Endpoint:
|
||||
raw_auth, at, endpoint_authority = authority.rpartition("@")
|
||||
if not at:
|
||||
raise ValidationError("Missing Hysteria2 authentication data")
|
||||
if "@" in raw_auth:
|
||||
raise ValidationError("Special characters in Hysteria2 authentication data must be percent-encoded")
|
||||
password = _decode(raw_auth, "authentication data")
|
||||
if not password:
|
||||
raise ValidationError("Missing Hysteria2 authentication data")
|
||||
|
||||
Reference in New Issue
Block a user