Added function to sanitize strings by escaping quotes (#2360)
This commit is contained in:
@@ -27,6 +27,8 @@ import (
|
||||
"github.com/graymeta/stow"
|
||||
"github.com/pkg/errors"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/fission/fission/pkg/utils"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -173,6 +175,7 @@ func (client *StowClient) copyFileToStream(fileId string, w io.Writer) error {
|
||||
return ErrWritingFileIntoResponse
|
||||
}
|
||||
|
||||
fileId = utils.EscapeQuotes(fileId)
|
||||
client.logger.Debug("successfully wrote file into httpresponse", zap.String("file", fileId))
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user