| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
isValidRepoUrl() matched the .json/.rpi-imager-manifest extension against the full URL string, so any query string or fragment after the extension broke the match. This rejected valid, authenticated manifest URLs such as Azure Blob SAS links or S3 presigned URLs. Match the extension against QUrl::path() instead, so query parameters and fragments are correctly ignored. Scheme and extension checks are otherwise unchanged. Fixes raspberrypi#1667
| Back | FazBrowse Home | New Git URL |
Problem
isValidRepoUrl() requires the URL to end with .json or the manifest
extension, but matches this against the full URL string, including the
query string. This breaks authenticated manifest URLs such as Azure Blob
SAS links or S3 presigned URLs.
Fixes #1667
Fix
Match the extension regex against QUrl::path() instead of the raw URL
string, so query parameters and fragments no longer break the check.
Why keep the extension check
isValidRepoUrl() is used in two places:
deep links (added in 86c3e20)
The deep link can be triggered by an external site without direct user
input, so the extension check acts as a first-pass filter before the
confirmation dialog. This PR keeps that check and only fixes how it's
matched, rather than removing it.