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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user