Skip to content

Commit

Permalink
Do not escape relative path in RPM primary index (#32038)
Browse files Browse the repository at this point in the history
Fixes #32021

Do not escape the relative path.
  • Loading branch information
KN4CK3R authored Sep 16, 2024
1 parent 859be09 commit f528df9
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 f528df9

Please sign in to comment.