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: escape slashes in regular expressions #710

Closed
wants to merge 1 commit into from

Conversation

ctron
Copy link

@ctron ctron commented Mar 19, 2024

It looks like some regexp engines do have an issue with slashes not being escaped. This change fixes this by also escaping slashes.

It looks like some regexp engines do have an issue with slashes not
being escaped. This change fixes this by also escaping slashes.
@santosomar
Copy link
Contributor

Thank you so much for catching this and suggesting the fix. We will quickly discuss during the TC meeting and then merge the changes. Thank you again!

tschmidtb51 added a commit to tschmidtb51/csaf that referenced this pull request Mar 27, 2024
- addresses parts of oasis-tcs#693, oasis-tcs#710
- correct pattern to `^((CPE2.3)|(CPE2.2))$`
- add additional `\\` to escape previously unescaped `/`
Copy link
Contributor

@sthagen sthagen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@tschmidtb51
Copy link
Contributor

The related issue is #693. I'll provide a PR which addresses the suggestion completely.

tschmidtb51 added a commit to tschmidtb51/csaf that referenced this pull request Mar 27, 2024
- addresses parts of oasis-tcs#710
- add additional `\\` to escape previously unescaped `/`
@tschmidtb51 tschmidtb51 mentioned this pull request Mar 27, 2024
@tschmidtb51
Copy link
Contributor

@ctron Thank you for the suggestion. I added the necessary tests and prose changes according to your suggestion. Please review the superseding PR #711.

@tschmidtb51
Copy link
Contributor

@ctron If you are okay with that, we will close this PR in favor of #710

tschmidtb51 added a commit to tschmidtb51/csaf that referenced this pull request Mar 27, 2024
- addresses parts of oasis-tcs#710
- backport of 61e78c8
- correct parsing of CPE 2.3 Dictionary (to also capture endings `">` instead of just `"/>`)
@tschmidtb51 tschmidtb51 mentioned this pull request Mar 27, 2024
@tschmidtb51
Copy link
Contributor

Superseded by #711

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

4 participants