Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[WebProfilerBundle] Normalize whitespace in exceptions passed in headers #22154

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

Merged
merged 1 commit into from
Mar 29, 2017

Conversation

curry684
Copy link
Contributor

@curry684 curry684 commented Mar 24, 2017

Q A
Branch? 2.7 upwards
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #22072
License MIT

If an exception was thrown with line separators in its message the WebProfiler would cause an exception by passing it through unsanitized into the X-Debug-Error HTTP header. This commit fixes that by replacing all whitespace sequences with a single space in the header.

@nicolas-grekas
Copy link
Member

should be applied to 2.7
LGTM otherwise

@nicolas-grekas nicolas-grekas added this to the 2.7 milestone Mar 28, 2017
If an exception was thrown with line separators in its message the
WebProfiler would cause an exception by passing it through unsanitized
into the X-Debug-Error HTTP header. This commit fixes that by replacing
all whitespace sequences with a single space in the header.
@curry684 curry684 changed the base branch from 3.2 to 2.7 March 28, 2017 20:47
@curry684
Copy link
Contributor Author

Rebased on 2.7

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

👍

@fabpot
Copy link
Member

fabpot commented Mar 29, 2017

Thank you @curry684.

@fabpot fabpot merged commit d646790 into symfony:2.7 Mar 29, 2017
fabpot added a commit that referenced this pull request Mar 29, 2017
…sed in headers (curry684)

This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Normalize whitespace in exceptions passed in headers

| Q             | A
| ------------- | ---
| Branch?       | 2.7 upwards
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22072
| License       | MIT

If an exception was thrown with line separators in its message the WebProfiler would cause an exception by passing it through unsanitized into the X-Debug-Error HTTP header. This commit fixes that by replacing all whitespace sequences with a single space in the header.

Commits
-------

d646790 [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
@curry684 curry684 deleted the issue-22072 branch March 29, 2017 07:46
This was referenced Apr 4, 2017
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull request Mar 25, 2018
…ons passed in headers (curry684)

This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Normalize whitespace in exceptions passed in headers

| Q             | A
| ------------- | ---
| Branch?       | 2.7 upwards
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony#22072
| License       | MIT

If an exception was thrown with line separators in its message the WebProfiler would cause an exception by passing it through unsanitized into the X-Debug-Error HTTP header. This commit fixes that by replacing all whitespace sequences with a single space in the header.

Commits
-------

d646790 [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants