-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Proxito: escaped HTTP headers and CF worker #11129
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
Comments
We don't need to escape values twice, only in the context where they are used, the 1st option should be to escape the values in the worker only. Escaping the values twice would lead to an incorrect value. |
I'm more confused now. Why we would like to put an unsafe value over the wire if it has to be escaped to be used securely anyways? |
@humitos the value isn't unsafe by itself, it's only unsafe in the context where it's used, in this case when building the HTML by concatenating the values. If we want to use the value just a string, we want to have the original value as is This is similar to why we escape the values from our search API where they are used instead of escaping them from the server. |
Gotcha 👍🏼 . I got confused because what you are describing here solves a more broad problem -- it's a "general purpose solution", but we don't have those issues here. We just need a filename here without need to manipulate it or anything similar. I'm happy to implement the generic approach you are describing once we need it 👍🏼 |
I'm open this issue to keep the discussion about where the HTTP header values should be escaped and how. This conversation started in #11100 (review)
There are different approach discussed there:
The code is currently secure and safe and there is no need to change it. However, this issue will help us to discuss what path to follow.
The text was updated successfully, but these errors were encountered: