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

BUGFIX: Properly encode error message in internal request header #2756

Merged
merged 1 commit into from Mar 22, 2022

Conversation

albe
Copy link
Member

@albe albe commented Mar 21, 2022

According to the HTTP spec, characters like line breaks and some other are not allowed within a request header. Exception messages typically include those. Since guzzlehttp/psr7 1.8.4 it validates headers to this spec and makes our builds fail. This fixes that by base64 encoding the exception message we transfer via the X-Flow-ExceptionMessage header. Currently there is no code in the core that uses this header, but if you read this header at some obscure place, you need to base64_decode() the value first.

See https://github.com/guzzle/psr7/pull/486/files#diff-fb174524a7bba27ce140bc6ccd1c30811a6abeed9328e783b326189551ba7ed4R253

According to the HTTP spec, characters like line breaks and some other are not allowed within a request header. Exception messages typically include those. Since guzzlehttp/psr7 1.8.4 it validates headers to this spec and makes our builds fail. This fixes that by base64 encoding the exception message we transfer via the `X-Flow-ExceptionMessage` header. Currently there is no code in the core that uses this header, but if you read this header at some obscure place, you need to `base64_decode()` the value first.
@albe albe added the Bug label Mar 21, 2022
@albe albe mentioned this pull request Mar 21, 2022
4 tasks
Copy link
Member

@mficzel mficzel left a comment

Choose a reason for hiding this comment

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

Fine by reading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants