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