mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
Use correct base URL
This commit is contained in:
parent
6ac97810d0
commit
1098c6add0
4 changed files with 5 additions and 5 deletions
|
|
@ -632,7 +632,6 @@ func (p *processor) integrity(
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
makeAbs := makeAbsolute(b)
|
||||
client := p.httpClient()
|
||||
|
||||
var data bytes.Buffer
|
||||
|
|
@ -643,7 +642,6 @@ func (p *processor) integrity(
|
|||
lg(ErrorType, "Bad URL %s: %v", f, err)
|
||||
continue
|
||||
}
|
||||
fp = makeAbs(fp)
|
||||
|
||||
u := misc.JoinURL(b, fp).String()
|
||||
|
||||
|
|
@ -777,7 +775,6 @@ func (p *processor) integrity(
|
|||
lg(ErrorType, "Bad URL %s: %v", x.url(), err)
|
||||
continue
|
||||
}
|
||||
hu = makeAbs(hu)
|
||||
hashFile := misc.JoinURL(b, hu).String()
|
||||
|
||||
p.checkTLS(hashFile)
|
||||
|
|
@ -827,7 +824,6 @@ func (p *processor) integrity(
|
|||
lg(ErrorType, "Bad URL %s: %v", f.SignURL(), err)
|
||||
continue
|
||||
}
|
||||
su = makeAbs(su)
|
||||
sigFile := misc.JoinURL(b, su).String()
|
||||
p.checkTLS(sigFile)
|
||||
|
||||
|
|
@ -1527,6 +1523,7 @@ func (p *processor) checkPGPKeys(_ string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
base.Path = ""
|
||||
|
||||
for i := range keys {
|
||||
key := &keys[i]
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ func (p *processor) processROLIEFeeds(feeds [][]csaf.Feed) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
base.Path = ""
|
||||
p.badROLIEFeed.use()
|
||||
|
||||
advisories := map[*csaf.Feed][]csaf.AdvisoryFile{}
|
||||
|
|
@ -291,7 +292,7 @@ func (p *processor) processROLIEFeeds(feeds [][]csaf.Feed) error {
|
|||
// TODO: Issue a warning if we want check AMBER+ without an
|
||||
// authorizing client.
|
||||
|
||||
if err := p.integrity(files, feedBase, rolieMask, p.badProviderMetadata.add); err != nil {
|
||||
if err := p.integrity(files, base.String(), rolieMask, p.badProviderMetadata.add); err != nil {
|
||||
if err != errContinue {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,6 +229,7 @@ func (d *downloader) download(ctx context.Context, domain string) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("invalid URL '%s': %v", lpmd.URL, err)
|
||||
}
|
||||
base.Path = ""
|
||||
|
||||
expr := util.NewPathEval()
|
||||
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ func (afp *AdvisoryFileProcessor) processROLIE(
|
|||
slog.Error("Cannot parse feed base URL", "url", fb, "err", err)
|
||||
continue
|
||||
}
|
||||
feedBaseURL.Path = ""
|
||||
|
||||
res, err := afp.client.Get(feedURL.String())
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue