Use filepath.Base to sanitize path for archive downloads (#7805)
This commit is contained in:
parent
f777bec798
commit
e0d2fc8eaa
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 = filepath.Clean(serverFileName)
|
||||
fileName = filepath.Base(serverFileName)
|
||||
} else {
|
||||
return errors.New("unable to determine file name of archive")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue