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

Safe Handling of Invalid UTF-8 in the Cookie Header #28

Closed

Conversation

hrmsk66
Copy link

@hrmsk66 hrmsk66 commented Nov 15, 2023

In the current implementation, the presence of invalid UTF-8 strings in the Cookie header causes a panic, leading to a 500 response. This PR addresses the issue by using remove_header_str_lossy(). With this update, the service will no longer panic with such headers. Invalid UTF-8 strings will be replaced with the U+FFFD REPLACEMENT CHARACTER (�).

@hrmsk66 hrmsk66 requested a review from a team as a code owner November 15, 2023 07:36
@hrmsk66 hrmsk66 requested review from aturon and removed request for a team November 15, 2023 07:36
@hrmsk66 hrmsk66 changed the title Safe Handling of Invalid UTF-8 in Request Headers Safe Handling of Invalid UTF-8 in the Cookie Header Nov 16, 2023
@hrmsk66 hrmsk66 closed this Feb 23, 2024
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.

1 participant