Re: Trouble passing through backslash in URL path

2025-04-14 Thread John Dale (DB2DOM)
UNSUBSCRIBE On Thu, Jan 23, 2025 at 9:00 AM James Matlik wrote: > It works! > > I've been able to test with a customer name of: ÀËÌÑàëíñøü / \ Ѐӿ 中さ 😀 > customer > This covers > - Latin-1 Supplement characters are 1 byte: ÀËÌÑàëíñøü > - The / and \ slash characters are ASCII, but are encoded d

Re: Trouble passing through backslash in URL path

2025-01-25 Thread James Matlik
Maxim and Chris, LOL! Yes, I am definitely an ignorant westerner. Thanks for pointing out my mistake. I'll be updating my unit test comments accordingly. -James On Fri, Jan 24, 2025, 9:57 PM Maxim Solodovnik wrote: > Chris, > > from mobile (sorry for typos ;) > > > On Sat, Jan 25, 2025, 05:35

Re: Trouble passing through backslash in URL path

2025-01-24 Thread Maxim Solodovnik
Chris, from mobile (sorry for typos ;) On Sat, Jan 25, 2025, 05:35 Christopher Schultz < ch...@christopherschultz.net> wrote: > Maxim, > > On 1/23/25 9:31 PM, Maxim Solodovnik wrote: > > from mobile (sorry for typos ;) > > > > > > On Thu, Jan 23, 2025, 23:00 James Matlik wrote: > > > >> It wor

Re: Trouble passing through backslash in URL path

2025-01-24 Thread Christopher Schultz
Maxim, On 1/23/25 9:31 PM, Maxim Solodovnik wrote: from mobile (sorry for typos ;) On Thu, Jan 23, 2025, 23:00 James Matlik wrote: It works! I've been able to test with a customer name of: ÀËÌÑàëíñøü / \ Ѐӿ 中さ 😀 customer This covers - Latin-1 Supplement characters are 1 byte: ÀËÌÑàëíñøü

Re: Trouble passing through backslash in URL path

2025-01-24 Thread Mark Thomas
On 23/01/2025 15:57, James Matlik wrote: It works! I've been able to test with a customer name of: ÀËÌÑàëíñøü / \ Ѐӿ 中さ 😀 customer This covers - Latin-1 Supplement characters are 1 byte: ÀËÌÑàëíñøü - The / and \ slash characters are ASCII, but are encoded due to special meaning in a URL -

Re: Trouble passing through backslash in URL path

2025-01-23 Thread Maxim Solodovnik
from mobile (sorry for typos ;) On Thu, Jan 23, 2025, 23:00 James Matlik wrote: > It works! > > I've been able to test with a customer name of: ÀËÌÑàëíñøü / \ Ѐӿ 中さ 😀 > customer > This covers > - Latin-1 Supplement characters are 1 byte: ÀËÌÑàëíñøü > - The / and \ slash characters are ASCII,

Re: Trouble passing through backslash in URL path

2025-01-23 Thread James Matlik
It works! I've been able to test with a customer name of: ÀËÌÑàëíñøü / \ Ѐӿ 中さ 😀 customer This covers - Latin-1 Supplement characters are 1 byte: ÀËÌÑàëíñøü - The / and \ slash characters are ASCII, but are encoded due to special meaning in a URL - Cyrillic characters are 2 bytes: Ѐӿ - Chinese

Re: Trouble passing through backslash in URL path

2025-01-23 Thread Mark Thomas
James, I've added attributes (encodedReverseSolidusHandling and encodedSolidusHandling) to the Context to provide control of how the RequestDispatcher paths are processed. Snapshots built after 12.00 UTC today should include the new attributes. As I type, Tomcat 12 is available, Tomcat 11 is

Re: Trouble passing through backslash in URL path

2025-01-22 Thread Mark Thomas
This is going to be fun. The RequestDispatcher processing currently does not take account of encodedSolidusHandling or encodedReverseSolidusHandling. RequestDsipatcher URLs are processed using the defaults. I have a test case that demonstrates various forms of this problem. I am currently wo

Re: Trouble passing through backslash in URL path

2025-01-21 Thread James Matlik
It got further, but ran into another security check within the org.apache.catalina.core.ApplicationContext. I'm using the 10.1.35-SNAPSHOT version as that is closest to my current version, and easiest to test as a result. This is the block of code having trouble now (linking into 10.1.34): https://

Re: Trouble passing through backslash in URL path

2025-01-21 Thread Mark Thomas
On 21/01/2025 14:15, James Matlik wrote: Hello Mark, Yes, I would be available to test a snapshot if this gets implemented. Latest (as I type this) Tomcat 12 build with the new feature: https://repository.apache.org/content/groups/snapshots/org/apache/tomcat/tomcat/12.0.0-M1-SNAPSHOT/tomcat-12

Re: Trouble passing through backslash in URL path

2025-01-21 Thread James Matlik
Hello Mark, Yes, I would be available to test a snapshot if this gets implemented. -James On Tue, Jan 21, 2025 at 8:17 AM Mark Thomas wrote: > On 18/01/2025 16:18, James Matlik wrote: > > I agree with everything you have said. As the config options stand today, > > the allowBackslash seems to

Re: Trouble passing through backslash in URL path

2025-01-21 Thread Mark Thomas
On 18/01/2025 16:18, James Matlik wrote: I agree with everything you have said. As the config options stand today, the allowBackslash seems to implement part of encodeSolidusHandling. While encodeSolidusHandling supports: * REJECT - Return 400 on encoded / * DECODE - Decodes the / * PASS_THROUGH

Re: Trouble passing through backslash in URL path

2025-01-18 Thread James Matlik
I agree with everything you have said. As the config options stand today, the allowBackslash seems to implement part of encodeSolidusHandling. While encodeSolidusHandling supports: * REJECT - Return 400 on encoded / * DECODE - Decodes the / * PASS_THROUGH - Passes the encoded / as is The allowBac

Re: Trouble passing through backslash in URL path

2025-01-17 Thread Christopher Schultz
James, On 1/17/25 8:04 AM, James Matlik wrote: When I'm talking about path parameters, it is in the context of how Open API/Swagger defined them: https://swagger.io/docs/specification/v3_0/describing-parameters/ Okay, that helps clear things up. In the URL specification (inherited by HTTP) de

Re: Trouble passing through backslash in URL path

2025-01-17 Thread James Matlik
Mark, When I'm talking about path parameters, it is in the context of how Open API/Swagger defined them: https://swagger.io/docs/specification/v3_0/describing-parameters/ The OS is AWS Linux running in a Docker container. On Fri, Jan 17, 2025, 3:52 AM Mark Thomas wrote: > James, > > A comment

Re: Trouble passing through backslash in URL path

2025-01-17 Thread Mark Thomas
James, A comment and a question. You are talking about the servlet path here. Path parameters are something different (.../path-segment;path-param-name=path-param-value/...) Which operating system are you using? Mark 16 Jan 2025 15:38:50 James Matlik : Thank you for responding, Chris.

Re: Trouble passing through backslash in URL path

2025-01-16 Thread James Matlik
Thank you for responding, Chris. An example URL that causes this issue has a format like the following: http://localhost:8080/group/{groupName} A URL like this works just fine and is able to set the groupName to "(ON/QC) LOCAL": http://localhost:8080/group/%28ON%2FQC%29%20LOCAL When I call `reque

Re: Trouble passing through backslash in URL path

2025-01-15 Thread Christopher Schultz
James, On 1/15/25 2:39 PM, James Matlik wrote: I have an API that needs Tomcat to accept both the escaped forward slash '/' (%2F) and escaped backslash '\' (%5C) and pass them through to the servlet (Spring application). This need exists to support path parameters with special URL relevant chara

Trouble passing through backslash in URL path

2025-01-15 Thread James Matlik
I have an API that needs Tomcat to accept both the escaped forward slash '/' (%2F) and escaped backslash '\' (%5C) and pass them through to the servlet (Spring application). This need exists to support path parameters with special URL relevant characters. I've been able to successfully get the forw