Skip to content

Comments

Potential fix for code scanning alert no. 3: Overly permissive regular expression range#30

Merged
SebastianLopezO merged 1 commit intomainfrom
alert-autofix-3
Jul 2, 2025
Merged

Potential fix for code scanning alert no. 3: Overly permissive regular expression range#30
SebastianLopezO merged 1 commit intomainfrom
alert-autofix-3

Conversation

@SebastianLopezO
Copy link
Member

Potential fix for https://github.com/SmartPotTech/SmartPot-API/security/code-scanning/3

To fix the issue, the overly permissive range Á-ÿ should be replaced with a more precise range that matches only alphabetic characters. This can be achieved by explicitly listing the ranges for uppercase (Á-Ú) and lowercase (á-ú) accented characters, ensuring that non-alphabetic characters are excluded.

The changes should be applied to both NAME_PATTERN and LASTNAME_PATTERN constants in the UserRegex class. No additional imports or dependencies are required.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…r expression range

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@SebastianLopezO SebastianLopezO marked this pull request as ready for review July 2, 2025 15:20
@SebastianLopezO SebastianLopezO merged commit 7236248 into main Jul 2, 2025
4 checks passed
@SebastianLopezO SebastianLopezO deleted the alert-autofix-3 branch July 2, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants