mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-11 10:50:35 -05:00
[PR #2578] [CLOSED] fix: use web api to extract path from URL properly #37720
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/2578
Author: @moohbr
Created: 3/2/2026
Status: ❌ Closed
Base:
main← Head:fix/url-path-in-apply-rules📝 Commits (1)
9c08348fix: use web api to extract path from URL properly📊 Changes
1 file changed (+3 additions, -2 deletions)
View changed files
📝
server/routers/badger/verifySession.ts(+3 -2)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Fix PATH based resource rules failing to match when the request contains a query string.
Badger sends the path field with the full URI including query parameters (e.g.
/stream.html?token=111). TheisPathAllowedfunction performs segment-based matching, so/stream.html?token=111never matches a rule configured as/stream.html, causingBypass Authrules to silently fail for unauthenticated users.Instead of relying on the path and host fields sent by Badger, both are now derived from
originalRequestURLusing the nativeURL API, which guarantees a cleanpathname(no query string or fragment) and a consistent host.How to test?
Authentication= Protected and Rules enabled/stream.html/stream.html?token=111andoriginalRequestURL:https://<resource-domain>/stream.html?token=111and empty sessionsvalid: true/config.htmland confirmvalid: false🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.