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

CQI-96: fixed regex processing to satisfy security requirements #87

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

sniedzielski
Copy link
Contributor

TICKET: https://openimis.atlassian.net/browse/CQI-96

EXPLANATION:
We replaced the regular expression with a non-backtracking variant while maintaining the functionality. In this specific case, the regex is used for formatting a number with commas for better readability. We used a non-backtracking regex to achieve the same result.

The provided solution works in the same way as the original code. It formats the number by adding commas for better readability, just like the original regex. The change made is designed to address the security issue while preserving the intended functionality.

Screenshot from 2023-10-18 15-11-05

@sonarcloud
Copy link

sonarcloud bot commented Oct 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dborowiecki dborowiecki merged commit a40b038 into develop Oct 19, 2023
4 checks passed
@dborowiecki dborowiecki deleted the feature/CQI-96 branch October 19, 2023 12:44
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.

None yet

2 participants