Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion services/migrations/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ func (g *RepositoryDumper) CreateReleases(_ context.Context, releases ...*base.R
return err
}
for _, asset := range release.Assets {
attachLocalPath := filepath.Join(attachDir, asset.Name)
p := uuid.New().String()
// we cannot use asset.Name because it might contains special characters.
attachLocalPath := filepath.Join(attachDir, p)

// SECURITY: We cannot check the DownloadURL and DownloadFunc are safe here
// ... we must assume that they are safe and simply download the attachment
Expand Down