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 normalization for URLs containing dash and no underscore #75

Merged
merged 1 commit into from Dec 30, 2015

Conversation

romainneutron
Copy link
Collaborator

Symfony config normalize array keys that contains dashes and no underscore, see symfony/symfony#17129 .
We should not allow normalization on clickjacking keys in rules definition because it breaks the configuration.
For instance, the following conf:

        paths:
            '^/[a-zA-Z]+$': 'ALLOW'
            '^/': 'DENY'

becomes after normalization:

array(2) {
  ["^/[a_zA_Z]+$"]=>
  array(1) {
    ["header"]=>
    string(5) "ALLOW"
  }
  ["^/"]=>
  array(1) {
    ["header"]=>
    string(4) "DENY"
  }
}

This patch fixes this behavior

@sstok
Copy link

sstok commented Dec 28, 2015

👍

@Seldaek
Copy link
Member

Seldaek commented Dec 30, 2015

Ah good catch thanks

Seldaek added a commit that referenced this pull request Dec 30, 2015
Fix normalization for URLs containing dash and no underscore
@Seldaek Seldaek merged commit e6a1d2c into nelmio:master Dec 30, 2015
@romainneutron romainneutron deleted the fix-clickjacking-regexp-dash branch December 31, 2015 14:41
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

3 participants