nagarjunaundela created AMQNET-853:
--------------------------------------

             Summary: Apache.NMS STOMP/OpenWire URI parsing fails when the 
encoded certificate subject contains parentheses () inside the 
transport.clientcertsubject parameter.
                 Key: AMQNET-853
                 URL: https://issues.apache.org/jira/browse/AMQNET-853
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: ActiveMQ, NMS, Stomp
    Affects Versions: 1.5.4
         Environment: * Apache.NMS / Apache.NMS.Stomp
 * .NET environment (version can be added by user)
 * ActiveMQ STOMP/SSL connection
 * Using DLL provided externally (we do not build the library ourselves)
 
            Reporter: nagarjunaundela
             Fix For: 1.5.4


We are using {{Apache.NMS}} and {{Apache.NMS.Stomp}} in our project.
During connection creation, the URI parser throws an exception when the encoded 
certificate subject contains parentheses.

The error appears as:

{{Invalid Uri parameter: ... (fails at part containing ())}}
----
h2. *Sample Certificate Subjects (Sanitized)*

*Old subject (works):*

{{C=XX, OU=Unit, O=Sample Organization, CN=12345}}
*New subject (fails due to parentheses):*

{{C=XX, OU=Unit, O=Sample Organization (Example), CN=12345}}
These are {*}sample placeholders{*}, not real certificate details.
----
h2. *Sample URL-encoded Value (Sanitized)*

{{transport.clientcertsubject=
C%3dXX%2c+OU%3dUnit%2c+O%3dSample+Organization+(Example)%2c+CN%3d12345}}
When this parameter is included inside the connection URI, NMS fails to parse 
it.
----
h2. *Technical Observation*

In the STOMP/OpenWire logic located under paths like:

{{APACHE.NMS / Util / URISupport
APACHE.NMS.Stomp}}
The method {{ParseComposite()}} checks for the {{(}} character to detect 
composite URIs.

Thus:
 * Parentheses inside an encoded parameter value ({{{}(Example){}}})
are incorrectly treated as composite-URI syntax
 * This causes parsing failure and leads to the “Invalid Uri parameter” error

----
h2. *Expected Behavior*

Parentheses {{()}} inside URL‑encoded parameter values should be treated as 
literal characters, not composite URI markers.
----
h2. *Actual Behavior*
 * URI parsing fails if the encoded parameter includes {{(}}
 * Connection cannot be created

----
h2. *Steps to Reproduce (Sanitized)*
 # Create any certificate subject that includes parentheses:
{{O=Sample Organization (Example)}}
 # URL‑encode it and include it in the parameter:
{{transport.clientcertsubject=<encoded value>}}
 # Build the NMS connection URI containing this parameter.
 # Call {{CreateConnection()}} from {{{}ConnectionFactory{}}}.
 # Observe that parsing fails with “Invalid Uri parameter”.
 
Please update the URI parsing implementation so that parentheses inside encoded 
parameter values do not trigger composite-URI parsing in 
{{{}URISupport.ParseComposite(){}}}.

This issue blocks valid SSL/STOMP connections for certificates that legally 
contain parentheses.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to