Skip to content

Commit

Permalink
Do not escape relative path in RPM primary index (#32038) (#32054)
Browse files Browse the repository at this point in the history
Backport #32038 by @KN4CK3R

Fixes #32021

Do not escape the relative path.

Co-authored-by: KN4CK3R <[email protected]>
  • Loading branch information
GiteaBot and KN4CK3R authored Sep 17, 2024
1 parent 3d7d0c3 commit 8a39a48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions services/packages/rpm/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"errors"
"fmt"
"io"
"net/url"
"strings"
"time"

Expand Down Expand Up @@ -438,7 +437,7 @@ func buildPrimary(ctx context.Context, pv *packages_model.PackageVersion, pfs []
Archive: pd.FileMetadata.ArchiveSize,
},
Location: Location{
Href: fmt.Sprintf("package/%s/%s/%s/%s", url.PathEscape(pd.Package.Name), url.PathEscape(packageVersion), url.PathEscape(pd.FileMetadata.Architecture), url.PathEscape(fmt.Sprintf("%s-%s.%s.rpm", pd.Package.Name, packageVersion, pd.FileMetadata.Architecture))),
Href: fmt.Sprintf("package/%s/%s/%s/%s-%s.%s.rpm", pd.Package.Name, packageVersion, pd.FileMetadata.Architecture, pd.Package.Name, packageVersion, pd.FileMetadata.Architecture),
},
Format: Format{
License: pd.VersionMetadata.License,
Expand Down

0 comments on commit 8a39a48

Please sign in to comment.