mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-08 21:59:09 -05:00
[PR #1948] [CLOSED] Potential fix for Server-side request forgery #9557
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/1948
Author: @marcschaeferger
Created: 11/29/2025
Status: ❌ Closed
Base:
main← Head:fix-security/js-request-forgery📝 Commits (4)
5f66127Potential fix for code scanning alert no. 16: Server-side request forgery8c4a661Potential fix for code scanning alert no. 17: Server-side request forgeryf0104e1Potential fix for code scanning alert no. 18: Server-side request forgeryae3a2b9fix(generatedLicense): enforce UUID v4 orgId validation📊 Changes
3 files changed (+50 additions, -2 deletions)
View changed files
📝
server/private/routers/generatedLicense/generateNewLicense.ts(+10 -0)📝
server/private/routers/generatedLicense/listGeneratedLicenses.ts(+4 -2)📝
src/actions/server.ts(+36 -0)📄 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 (generated by Copilot)
See https://codeql.github.com/codeql-query-help/javascript/js-request-forgery/
Code generated by Copilot
This pull request introduces stricter validation for organization and resource identifiers to improve security and consistency across API endpoints. The main changes add UUID format checks for organization IDs in license-related routes and type guard functions for resource and identity provider IDs in server-side actions, with corresponding input validation in proxy functions.
Validation improvements for organization IDs:
orgIdingenerateNewLicense.ts, ensuring only valid organization IDs are accepted when generating new licenses. [1] [2]listGeneratedLicenses.tsto requireorgIdto match a UUID v4 pattern, rejecting invalid or missing organization IDs with a clear error message.Security enhancements in server-side actions:
isValidResourceIdandisValidIdpIdtype guard functions inserver.tsto validate resource and identity provider IDs, restricting accepted formats.resourcePasswordProxy,resourcePincodeProxy,resourceWhitelistProxy,resourceAccessProxy,validateOidcUrlCallbackProxy,generateOidcUrlProxy), throwing errors for invalid IDs to prevent unsafe requests. [1] [2] [3] [4] [5] [6]orgIdingenerateOidcUrlProxyto further strengthen input validation.How to test?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.