Skip to content

Commit

Permalink
enable valid prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Ridwan Hoq <[email protected]>
  • Loading branch information
ridhoq authored and sschuberth committed Mar 4, 2024
1 parent 322020f commit 6f82665
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packageurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ func (p *PackageURL) Normalize() error {
}
subpath := strings.Trim(p.Subpath, "/")
segs := strings.Split(p.Subpath, "/")
for _, s := range segs {
if s == "." || s == ".." {
for i, s := range segs {
if (s == "." || s == "..") && i != 0 {
return fmt.Errorf("invalid Package URL subpath: %q", p.Subpath)
}
}
Expand Down

0 comments on commit 6f82665

Please sign in to comment.