Release/v4.1.1 --> main#223
Merged
Merged
Conversation
v4.1.0 -> dev
Align sensitive route matching with the cross-enforcer spec by supporting regex-format string patterns alongside existing plain-string prefix matching. Patterns like "/^\/api\/.*\/payment$/i" are now detected and matched using preg_match, while plain strings continue to use prefix matching for backward compatibility. - Add PerimeterxRouteUtils with normalizePath, convertStringToRegex, and isPathInPatterns - Update PerimeterxContext to use PerimeterxRouteUtils::isPathInPatterns - Add comprehensive unit tests for all matching modes - Fix PHP 8.5 compatibility (PerimeterxLogger signature, PerimeterxPayload dynamic properties) - Add sample site for manual testing of sensitive route patterns - Update README with regex pattern documentation and trailing-slash caveat
When the _pxvid cookie contains a value that fails UUID validation, store the raw value in orig_cookie_vid on the context and include it in all activity details (page_requested, block, additional_s2s) and the risk API request. Also adds enforcer_vid_source to all activities and fixes the unanchored UUID validation regex in the S2S validator.
Paths with '..' segments that traverse above the root (e.g. '/../login') would lose the leading '/' and normalize to 'login' instead of '/login', allowing traversal-style URIs to bypass sensitive route detection. Prevent array_pop from removing the root segment by only popping when the resolved array has more than one element.
…ility The \Stringable|string union type and :void return type require PHP 8.0+, but the SDK supports PHP >=7.2.5. Revert to the original untyped signature.
Regex SR and Orig cookie vid support
chen-zimmer-px
approved these changes
Jul 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.