[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 --- Comment #12 from Mark Thomas --- Thanks for pointing out the error in the 9.0.x docs. It does indeed look like an incorrect back-port from 10.1.x. The 9.0.x docs have been corrected for 9.0.121 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 --- Comment #11 from Boris Petrov --- OK, I'm not sure what I've tested before but using `setAllowBackslash` worked now and fixed my problem. And that's a new setting which doesn't exist in Tomcat 9 so that's why it worked before. Thanks for the information and sorry for the confusion! Just a note about your documentation - in the Tomcat 9 docs: https://tomcat.apache.org/tomcat-9.0-doc/config/http.html In `encodedReverseSolidusHandling` there is a reference to `allowBackslash` but it's otherwise missing from that page. It's probably a copy-paste error from the docs in Tomcat 10/11. You might want to fix that. Thanks again! -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 Mark Thomas changed: What|Removed |Added Resolution|FIXED |INVALID --- Comment #10 from Mark Thomas --- Confirmed invalid using the provided test case. There is no behavioural difference between the standard Tomcat package and the embedded form. It is the same classes packaged differently. If you are seeing a difference in behaviour then you have configured them differently. To repeat my comment from almost a month ago - you need to set allowBackslash to true on the Connector (directly, not via setProperty()). That is required for 10.1.x and 11.0.x. For 9.0.x you have to set a system property. If you require further configuration assistance, the users mailing list is the correct venue to ask follow-up questions. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 --- Comment #9 from Remy Maucherat --- Here is the test case that was added: https://github.com/apache/tomcat/commit/9362c7d8b8ea230412d96424b946ebfe18bd It includes the correct embedded API use. Feel free to expand it to help us reproduce the issue if needed. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 Boris Petrov changed: What|Removed |Added Resolution|WORKSFORME |FIXED --- Comment #8 from Boris Petrov --- Hi Mark, thanks for taking the time. My problem still stands, however. This URL: https://localhost:8081/integration-tests/search/%22F%5C%22%22 Used to work fine in Tomcat 9.0.120. Upgrading to 11.0.24 leads to a `HTTP Status 400 – Bad Request` Tomcat page for that URL. Are you saying that with these settings that I've shown you can open such a URL? Again - using the EMBEDDED Tomcat - it is what seems to have the problem. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 Mark Thomas changed: What|Removed |Added Resolution|--- |WORKSFORME Status|NEW |RESOLVED --- Comment #7 from Mark Thomas --- Confirmed working as expected with a test case. Note that if the property exists on the Connector you must use the property specific setter. setProperty() (as documented in the Javadoc) only works for properties on the protocol handler. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 Boris Petrov changed: What|Removed |Added Status|NEEDINFO|NEW -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 --- Comment #6 from Boris Petrov --- Sorry, Ruby allows `\` to not be *ESCAPED* in a single-quote string. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 --- Comment #5 from Boris Petrov --- Sorry, should have been more specific. I use JRuby for my integration tests and this is Ruby code - and JRuby allows calling `A.setXXX(YYY)` methods as property setters - `A.XXX = YYY`. There is a method `Connector.setEncodedSolidusHandling` - which is being called by `connector.encoded_solidus_handling = EncodedSolidusHandling::DECODE.to_string`. For `SSLEnabled`, `relaxedPathChars` and `useVirtualThreads` there are no specific methods so I just use `setProperty` (again, JRuby allows this to be called as `set_property` as is Ruby's convention for method naming). The `\` is in the path, not a query string. And yes, Ruby allows `\` to not be quoted in a single-quote string. In any case, as I mentioned, this same unchanged code works fine when using 9.0.120. It breaks when I use 11.0.24. Only the `\` case - the other characters work fine. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144
Christopher Schultz changed:
What|Removed |Added
Status|NEW |NEEDINFO
--- Comment #4 from Christopher Schultz ---
> tomcat.connector.encoded_solidus_handling =
> EncodedSolidusHandling::DECODE.to_string
> tomcat.connector.set_property('SSLEnabled', true.to_s)
Why are these specified in different ways: ".property = value" versus
".set_property('name', 'value')"?
--
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 --- Comment #3 from Christopher Schultz --- Is the \ in URI's path or the query string? This configuration style isn't familiar to me. What language is it? Do you need to escape the backslash in the quoted string containing the relaxed characters? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 Christopher Schultz changed: What|Removed |Added Version|11.0.23 |11.0.24 -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 --- Comment #2 from Boris Petrov --- Nope, doesn't help. Also, as I mentioned, the problem is ONLY with the embedded Tomcat. The other one works fine. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 --- Comment #1 from Mark Thomas --- You need allowBackslash="true" as well. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[Bug 70144] Tomcat Embedded doesn't work with encoded `\`
https://bz.apache.org/bugzilla/show_bug.cgi?id=70144 Boris Petrov changed: What|Removed |Added CC||[email protected] -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
