Skip to content

Conversation

@tvdijen
Copy link
Contributor

@tvdijen tvdijen commented Nov 19, 2024

To prevent false positives, we can make use of the PCRE_DOLLAR_ENDONLY flag (D) that will constraint the $ anchor to match the end of the string only, not a newline character.

@thijskh thijskh requested a review from baszoetekouw November 20, 2024 05:42
@baszoetekouw
Copy link
Member

Looks good to me. Maybe for completeness, you could add a test that starts with a newline (should work with the existing regex, if the docs are right about the behaviour of \A).

@tvdijen tvdijen force-pushed the bugfix/urn-regex-disallow-newline branch from f52b478 to b5ac02c Compare December 6, 2024 11:11
@tvdijen tvdijen force-pushed the bugfix/urn-regex-disallow-newline branch from b5ac02c to 5b3ac91 Compare December 6, 2024 11:16
@baszoetekouw baszoetekouw merged commit fc75615 into OpenConext:main Dec 6, 2024
2 checks passed
@tvdijen tvdijen deleted the bugfix/urn-regex-disallow-newline branch December 7, 2024 17:36
@baszoetekouw baszoetekouw added this to the 6.17.0 milestone Sep 23, 2025
@baszoetekouw baszoetekouw moved this from New to Delivered in PHP development Oct 1, 2025
@baszoetekouw baszoetekouw moved this from Delivered to Ready for release in PHP development Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for release

Development

Successfully merging this pull request may close these issues.

2 participants