mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-09 06:09:26 -05:00
[PR #1949] [MERGED] Fix multiple reported Security Issues #4720
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/1949
Author: @marcschaeferger
Created: 11/30/2025
Status: ✅ Merged
Merged: 12/6/2025
Merged by: @oschwartz10612
Base:
main← Head:fix-security/other📝 Commits (4)
fbbab60Potential fix for code scanning alert no. 7: Insecure randomness3eab3b0Potential fix for code scanning alert no. 8: DOM text reinterpreted as HTML8df62e8Potential fix for code scanning alert no. 19: Inefficient regular expression336d31cfix(validators): restore 2+ char domain label requirement📊 Changes
3 files changed (+5 additions, -4 deletions)
View changed files
📝
server/db/names.ts(+3 -2)📝
server/lib/validators.ts(+1 -1)📝
src/components/LoginForm.tsx(+1 -1)📄 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
Code generated by Copilot
This pull request focuses on improving randomness, validation, and security in the codebase. The main changes include switching to cryptographically secure random number generation for name creation, refining URL validation logic, and ensuring safe encoding of user input in password reset links.
Randomness and security improvements:
Math.random()tocrypto.randomInt()ingenerateName()withinserver/db/names.ts, making name generation cryptographically secure. [1] [2]Validation logic:
isUrlValid()inserver/lib/validators.tsto more accurately validate domain names, preventing invalid formats.User input handling:
encodeURIComponent()to the email parameter in the password reset link inLoginForm.tsx, preventing potential issues with special characters and improving security.How to test?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.