fix(upnp): guard against out of index string access (#10834)

Broken responses may have empty path component.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-07-26 18:37:28 +00:00
committed by GitHub
parent 119d5e72ef
commit 703b185982
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -554,7 +554,7 @@ func replaceRawPath(u *url.URL, rp string) {
q = fs[1]
}
if p[0] == '/' {
if p != "" && p[0] == '/' {
u.Path = p
} else {
u.Path += p