combine: don't return an error message as the remote name for a bad object

This fixes 30 spurious CodeQL path-injection alerts which used the
error message as a taint path from HTTP responses into filesystem
paths.
This commit is contained in:
Nick Craig-Wood
2026-07-16 14:47:03 +01:00
parent 2eb6f6d961
commit 454430a057
+1 -1
View File
@@ -1104,7 +1104,7 @@ func (o *Object) Remote() string {
newPath, err := o.u.pathAdjustment.do(o.Object.String()) newPath, err := o.u.pathAdjustment.do(o.Object.String())
if err != nil { if err != nil {
fs.Errorf(o.Object, "Bad object: %v", err) fs.Errorf(o.Object, "Bad object: %v", err)
return err.Error() return ""
} }
return newPath return newPath
} }