Skip to content

Commit

Permalink
Merge pull request #5186 from dependabot/document-why-escaping-necessary
Browse files Browse the repository at this point in the history
Document why the link needs to be unescaped
  • Loading branch information
Nishnha authored May 24, 2022
2 parents 357cbc8 + 3a66a72 commit 2e6d066
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nuget/lib/dependabot/nuget/update_checker/version_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ def fetch_paginated_v2_nuget_listings(url_details, results = {})

if (link_href = fetch_v2_next_link_href(response.body))
url_details = url_details.dup
# Some Nuget repositories, such as JFrog's Artifactory, URL encode the "next" href
# link in the paged results. If the href is not URL decoded, the paging parameters
# are ignored and the first page is always returned.
url_details[:versions_url] = CGI.unescape(link_href)
fetch_paginated_v2_nuget_listings(url_details, results)
end
Expand Down

0 comments on commit 2e6d066

Please sign in to comment.