fix(fmt): decode the SIP002 plain-text password only once (#10520)

For a SIP002 link whose user info is "method:password" rather than
base64 (the 2022-blake3 form), ResolveSip002 unescapes the whole user
info and then unescapes the password a second time. A password that
still holds a valid percent sequence after the first pass decays:
p%41ss is written as p%2541ss and imported as pAss.

Same double-decoding as #10027 fixed for query values.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Wei-Lun Li
2026-11-04 10:34:45 +09:00
committed by GitHub
parent 9d1063f3f2
commit 0d9e84556e
2 changed files with 20 additions and 1 deletions
@@ -165,7 +165,7 @@ public class ShadowsocksFmt : BaseFmt
return null;
}
item.SetProtocolExtra(item.GetProtocolExtra() with { SsMethod = userInfoParts.First() });
item.Password = Utils.UrlDecode(userInfoParts.Last());
item.Password = userInfoParts.Last();
}
else
{