-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[Security] Allow an array of pattern in firewall configuration #18617
Merged
OskarStark
merged 1 commit into
symfony:6.4
from
alexandre-daubois:security-regex-pattern
Aug 1, 2023
Merged
[Security] Allow an array of pattern in firewall configuration #18617
OskarStark
merged 1 commit into
symfony:6.4
from
alexandre-daubois:security-regex-pattern
Aug 1, 2023
Conversation
This file contains 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
carsonbot
changed the title
[WCM][SecurityBundle] Allow an array of pattern in firewall configuration
[WCM] Allow an array of pattern in firewall configuration
Jul 27, 2023
chalasr
added a commit
to symfony/symfony
that referenced
this pull request
Jul 29, 2023
…ll configuration (lyrixx, chalasr) This PR was merged into the 6.4 branch. Discussion ---------- [SecurityBundle] Allow an array of `pattern` in firewall configuration | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | | License | MIT | Doc PR | symfony/symfony-docs#18617 allow this : ```diff security: firewalls: no_security: - pattern: "^/(register|documentation)$" + pattern: + - "^/register$" + - "^/documentation$" ``` --- ```php /** * `@Revs`(100) * `@Iterations`(100) */ class RegexBench { public function benchOneBigString() { preg_match("{^/(register|documentation)$}", "/register"); preg_match("{^/(register|documentation)$}", "/foo"); } public function benchArrayConcat() { preg_match("{(?:^/register$|^/documentation$)}", "/register"); preg_match("{(?:^/register$|^/documentation$)}", "/foo"); } } ``` => ``` PHPBench (dev-master) running benchmarks... #standwithukraine with configuration file: /home/gregoire/dev/github.com/lyrixx/php-bench/phpbench.json with PHP version 8.2.8, xdebug ❌, opcache ✔ \RegexBench benchOneBigString.......................I99 - Mo0.670μs (±17.85%) benchArrayConcat........................I99 - Mo0.664μs (±12.49%) Subjects: 2, Assertions: 0, Failures: 0, Errors: 0 +-------------------+---------+-----------+ | subject | mean | mem_peak | +-------------------+---------+-----------+ | benchOneBigString | 0.716μs | 995.920kb | | benchArrayConcat | 0.707μs | 995.920kb | +-------------------+---------+-----------+ ``` Commits ------- 46344de [SecurityBundle] Allow an array of `pattern` in firewall configuration
javiereguiluz
added
Status: Reviewed
and removed
Status: Needs Review
Waiting Code Merge
Docs for features pending to be merged
labels
Jul 31, 2023
javiereguiluz
changed the title
[WCM] Allow an array of pattern in firewall configuration
Allow an array of pattern in firewall configuration
Jul 31, 2023
carsonbot
changed the title
Allow an array of pattern in firewall configuration
[Security] Allow an array of pattern in firewall configuration
Jul 31, 2023
javiereguiluz
added a commit
to javiereguiluz/symfony-docs
that referenced
this pull request
Jul 31, 2023
…configuration (alexandre-daubois) This PR was merged into the 6.4 branch. Discussion ---------- [Security] Allow an array of pattern in firewall configuration Related to symfony/symfony#51128 Commits ------- 66a7330 [SecurityBundle] Allow an array of pattern in firewall configuration
Thanks a lot Alex! |
There's been an error here while merging. I can't see this merged in @alexandre-daubois please, don't delete your original branch until we find out what happened here. Thanks! |
Thank you Alexandre. |
It worked @javiereguiluz |
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.
Related to symfony/symfony#51128