Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code scanning alert no. 2: Missing regular expression anchor #376

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

jimmyzhen
Copy link
Contributor

Fixes https://github.com/MoTrPAC/motrpac-frontend/security/code-scanning/2

To fix the problem, we need to add an anchor at the end of the regular expression to ensure it matches the entire hostname string. This can be done by adding a $ at the end of the pattern. This change will ensure that only hostnames that exactly match the specified pattern will be considered valid.

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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@jimmyzhen jimmyzhen marked this pull request as ready for review October 31, 2024 07:12
@jimmyzhen jimmyzhen self-assigned this Oct 31, 2024
@jimmyzhen jimmyzhen merged commit ddf21e0 into dev Oct 31, 2024
6 checks passed
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.

1 participant