Use filepath.Clean to sanitize path for archive downloads (#7720)
This commit is contained in:
parent
5d82a9553c
commit
7f3196fcd4
1 changed files with 1 additions and 1 deletions
|
|
@ -290,7 +290,7 @@ func downloadAsset(dest *destinationWriter, httpClient *http.Client, assetURL, f
|
|||
return fmt.Errorf("unable to parse file name of archive: %w", err)
|
||||
}
|
||||
if serverFileName, ok := params["filename"]; ok {
|
||||
fileName = serverFileName
|
||||
fileName = filepath.Clean(serverFileName)
|
||||
} else {
|
||||
return errors.New("unable to determine file name of archive")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue