-
Notifications
You must be signed in to change notification settings - Fork 851
For xdebug plugin, add doublequotes around the URL of X-Effective-URL. #9899
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
For xdebug plugin, add doublequotes around the URL of X-Effective-URL. #9899
Conversation
URLs can have commas which makes the URLs fragile when multiple URLs are returned, and the values of multiple X-Effective-URL headers are merged. Follow-up on 170e12b (Adds new X-Effective-URL header to the xdebug plugin (apache#7931))
|
I suggest asking on the users mailing list if this would cause problems for anyone. |
I'd be really surprised if anyone else than me is using the X-Effective-URL debug feature, which I added two years ago for a very particular use case I have. Google search for trafficserver "x-effective-url" returns exactly two (2) hits, one in the 9.x "what's new" and one in the 9.2.0 changeling. |
|
RFC on URL Encoding: https://datatracker.ietf.org/doc/html/rfc1738#section-2.2 |
|
Note: the reason I suggested to back port this change to 9.2.x is that I think this is a bug (not just an enhancement). URLs that contain commas are problematic if those are in header values. See also the example on the RFC. |
|
Can you add documentation for this option in doc/admin-quide/plugins/xdebug.en.rst ? |
|
[approve ci clang-format] |
|
Not 100% sure this should go into 9.2.x, considering it does change behavior. |
|
This is the spec for a quoted string in an HTTP header field value: https://www.rfc-editor.org/rfc/rfc9110.html#name-quoted-strings So, the only potential non-compliance would be if a double quote was in the URL (without being URL encoded as %22). Can we be sure this won't happen? |
|
Double-quote is one of unsafe characters, and "All unsafe characters must always be encoded within a URL" according to RFC1738. |
Presumably that means ATS would ignore a request with a non-escaped double quote in a URL component. But, if not, I supposed that would be an issue to handle in a separate PR. However, we still have the issue that this is an undocumented feature of xdebug. |
|
Added documentation for the feature. |
apache#9899) (apache#615) * Add doublequotes around the URL of X-Effective-URL. URLs can have commas which makes the URLs fragile when multiple URLs are returned, and the values of multiple X-Effective-URL headers are merged. Follow-up on 170e12b (Adds new X-Effective-URL header to the xdebug plugin (apache#7931)) * Document the X-Effective-URL. (cherry picked from commit 7016476) Co-authored-by: jhiapple <85640167+jhiapple@users.noreply.github.com>
URLs can have commas which makes the URLs fragile when multiple URLs are returned, and the values of multiple X-Effective-URL headers are merged.
Follow-up on 170e12b (Adds new X-Effective-URL header to the xdebug plugin (#7931))