You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Torsten (JIRA)" <ji...@apache.org> on 2012/07/13 16:33:34 UTC

[jira] [Created] (AMQNET-393) URISupport.ParseQuery is missing decoding of parameters

Torsten created AMQNET-393:
------------------------------

             Summary: URISupport.ParseQuery is missing decoding of parameters
                 Key: AMQNET-393
                 URL: https://issues.apache.org/jira/browse/AMQNET-393
             Project: ActiveMQ .Net
          Issue Type: Bug
    Affects Versions: 1.5.1
            Reporter: Torsten
            Assignee: Jim Gomes


The problem is the same as mentioned here: http://timbish.blogspot.de/2011/06/apachenmsactivemq-v151-released.html?showComment=1310415346797#c3045395630917744034

If the uri contains encoded parameters the will not be correctly decoded in URISupport.ParseQuery. Hence the match of the certificates subject name fails.

The fix should be quite simple (not tested):

Decode the parameter in URISupport.ParseQuery :
{noformat}
map[nameValue[0]] = HttpUtility.UrlDecode(nameValue[1]);
{noformat}


Example:

My URL Paramter Value for "tansport.clientcertsubject" ist: 
CN=system, OU=global, O=ABC, L=Somewhere, S=State, C=com

In the uri I added it with HttpUtility.UrlDecode() and results in the URL:

?serverName=communote-test-broker&transport.clientCertSubject=CN%3dsystem%2c+OU%3dglobal%2c+O%3dABC...

Now URISupport will parse it, split it by "=" and decode the single parameter values.





--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-393) URISupport.ParseQuery is missing decoding of parameters

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413808#comment-13413808 ] 

Timothy Bish commented on AMQNET-393:
-------------------------------------

Did you test against trunk?
                
> URISupport.ParseQuery is missing decoding of parameters
> -------------------------------------------------------
>
>                 Key: AMQNET-393
>                 URL: https://issues.apache.org/jira/browse/AMQNET-393
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>            Reporter: Torsten
>            Assignee: Jim Gomes
>         Attachments: URISupportTest.cs
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The problem is the same as mentioned here: http://timbish.blogspot.de/2011/06/apachenmsactivemq-v151-released.html?showComment=1310415346797#c3045395630917744034
> If the uri contains encoded parameters the will not be correctly decoded in URISupport.ParseQuery. Hence the match of the certificates subject name fails.
> The fix should be quite simple (not tested):
> Decode the parameter in URISupport.ParseQuery :
> {noformat}
> map[nameValue[0]] = HttpUtility.UrlDecode(nameValue[1]);
> {noformat}
> Example:
> My URL Paramter Value for "tansport.clientcertsubject" ist: 
> CN=system, OU=global, O=ABC, L=Somewhere, S=State, C=com
> In the uri I added it with HttpUtility.UrlDecode() and results in the URL:
> ?serverName=communote-test-broker&transport.clientCertSubject=CN%3dsystem%2c+OU%3dglobal%2c+O%3dABC...
> Now URISupport will parse it, split it by "=" and decode the single parameter values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (AMQNET-393) URISupport.ParseQuery is missing decoding of parameters

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQNET-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish reassigned AMQNET-393:
-----------------------------------

    Assignee: Timothy Bish  (was: Jim Gomes)
    
> URISupport.ParseQuery is missing decoding of parameters
> -------------------------------------------------------
>
>                 Key: AMQNET-393
>                 URL: https://issues.apache.org/jira/browse/AMQNET-393
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>            Reporter: Torsten
>            Assignee: Timothy Bish
>         Attachments: URISupportTest.cs
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The problem is the same as mentioned here: http://timbish.blogspot.de/2011/06/apachenmsactivemq-v151-released.html?showComment=1310415346797#c3045395630917744034
> If the uri contains encoded parameters the will not be correctly decoded in URISupport.ParseQuery. Hence the match of the certificates subject name fails.
> The fix should be quite simple (not tested):
> Decode the parameter in URISupport.ParseQuery :
> {noformat}
> map[nameValue[0]] = HttpUtility.UrlDecode(nameValue[1]);
> {noformat}
> Example:
> My URL Paramter Value for "tansport.clientcertsubject" ist: 
> CN=system, OU=global, O=ABC, L=Somewhere, S=State, C=com
> In the uri I added it with HttpUtility.UrlDecode() and results in the URL:
> ?serverName=communote-test-broker&transport.clientCertSubject=CN%3dsystem%2c+OU%3dglobal%2c+O%3dABC...
> Now URISupport will parse it, split it by "=" and decode the single parameter values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-393) URISupport.ParseQuery is missing decoding of parameters

Posted by "Torsten (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413807#comment-13413807 ] 

Torsten commented on AMQNET-393:
--------------------------------

As far as I can state it seems still to be an open issue in the trunk: https://svn.apache.org/repos/asf/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs
                
> URISupport.ParseQuery is missing decoding of parameters
> -------------------------------------------------------
>
>                 Key: AMQNET-393
>                 URL: https://issues.apache.org/jira/browse/AMQNET-393
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>            Reporter: Torsten
>            Assignee: Jim Gomes
>         Attachments: URISupportTest.cs
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The problem is the same as mentioned here: http://timbish.blogspot.de/2011/06/apachenmsactivemq-v151-released.html?showComment=1310415346797#c3045395630917744034
> If the uri contains encoded parameters the will not be correctly decoded in URISupport.ParseQuery. Hence the match of the certificates subject name fails.
> The fix should be quite simple (not tested):
> Decode the parameter in URISupport.ParseQuery :
> {noformat}
> map[nameValue[0]] = HttpUtility.UrlDecode(nameValue[1]);
> {noformat}
> Example:
> My URL Paramter Value for "tansport.clientcertsubject" ist: 
> CN=system, OU=global, O=ABC, L=Somewhere, S=State, C=com
> In the uri I added it with HttpUtility.UrlDecode() and results in the URL:
> ?serverName=communote-test-broker&transport.clientCertSubject=CN%3dsystem%2c+OU%3dglobal%2c+O%3dABC...
> Now URISupport will parse it, split it by "=" and decode the single parameter values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-393) URISupport.ParseQuery is missing decoding of parameters

Posted by "Torsten (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413815#comment-13413815 ] 

Torsten commented on AMQNET-393:
--------------------------------

I just copied the method from the trunk into my test and used it and it fails too. 

(I only test this method not the overall integration with SSLTransport and so on.)

                
> URISupport.ParseQuery is missing decoding of parameters
> -------------------------------------------------------
>
>                 Key: AMQNET-393
>                 URL: https://issues.apache.org/jira/browse/AMQNET-393
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>            Reporter: Torsten
>            Assignee: Jim Gomes
>         Attachments: URISupportTest.cs
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The problem is the same as mentioned here: http://timbish.blogspot.de/2011/06/apachenmsactivemq-v151-released.html?showComment=1310415346797#c3045395630917744034
> If the uri contains encoded parameters the will not be correctly decoded in URISupport.ParseQuery. Hence the match of the certificates subject name fails.
> The fix should be quite simple (not tested):
> Decode the parameter in URISupport.ParseQuery :
> {noformat}
> map[nameValue[0]] = HttpUtility.UrlDecode(nameValue[1]);
> {noformat}
> Example:
> My URL Paramter Value for "tansport.clientcertsubject" ist: 
> CN=system, OU=global, O=ABC, L=Somewhere, S=State, C=com
> In the uri I added it with HttpUtility.UrlDecode() and results in the URL:
> ?serverName=communote-test-broker&transport.clientCertSubject=CN%3dsystem%2c+OU%3dglobal%2c+O%3dABC...
> Now URISupport will parse it, split it by "=" and decode the single parameter values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQNET-393) URISupport.ParseQuery is missing decoding of parameters

Posted by "Torsten (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQNET-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Torsten updated AMQNET-393:
---------------------------

    Attachment: URISupportTest.cs

I wrote a simple Test against the URISupport class that fails at the end because the parameter is not url decoded.

Not encoding the parameter beforehand would fail and it would not be correct to not encode.
                
> URISupport.ParseQuery is missing decoding of parameters
> -------------------------------------------------------
>
>                 Key: AMQNET-393
>                 URL: https://issues.apache.org/jira/browse/AMQNET-393
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>            Reporter: Torsten
>            Assignee: Jim Gomes
>         Attachments: URISupportTest.cs
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The problem is the same as mentioned here: http://timbish.blogspot.de/2011/06/apachenmsactivemq-v151-released.html?showComment=1310415346797#c3045395630917744034
> If the uri contains encoded parameters the will not be correctly decoded in URISupport.ParseQuery. Hence the match of the certificates subject name fails.
> The fix should be quite simple (not tested):
> Decode the parameter in URISupport.ParseQuery :
> {noformat}
> map[nameValue[0]] = HttpUtility.UrlDecode(nameValue[1]);
> {noformat}
> Example:
> My URL Paramter Value for "tansport.clientcertsubject" ist: 
> CN=system, OU=global, O=ABC, L=Somewhere, S=State, C=com
> In the uri I added it with HttpUtility.UrlDecode() and results in the URL:
> ?serverName=communote-test-broker&transport.clientCertSubject=CN%3dsystem%2c+OU%3dglobal%2c+O%3dABC...
> Now URISupport will parse it, split it by "=" and decode the single parameter values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-393) URISupport.ParseQuery is missing decoding of parameters

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413786#comment-13413786 ] 

Timothy Bish commented on AMQNET-393:
-------------------------------------

You should supply an NUnit test case to demonstrate your issue, along with a suggested patch and ensure you grant license to Apache.
                
> URISupport.ParseQuery is missing decoding of parameters
> -------------------------------------------------------
>
>                 Key: AMQNET-393
>                 URL: https://issues.apache.org/jira/browse/AMQNET-393
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>            Reporter: Torsten
>            Assignee: Jim Gomes
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The problem is the same as mentioned here: http://timbish.blogspot.de/2011/06/apachenmsactivemq-v151-released.html?showComment=1310415346797#c3045395630917744034
> If the uri contains encoded parameters the will not be correctly decoded in URISupport.ParseQuery. Hence the match of the certificates subject name fails.
> The fix should be quite simple (not tested):
> Decode the parameter in URISupport.ParseQuery :
> {noformat}
> map[nameValue[0]] = HttpUtility.UrlDecode(nameValue[1]);
> {noformat}
> Example:
> My URL Paramter Value for "tansport.clientcertsubject" ist: 
> CN=system, OU=global, O=ABC, L=Somewhere, S=State, C=com
> In the uri I added it with HttpUtility.UrlDecode() and results in the URL:
> ?serverName=communote-test-broker&transport.clientCertSubject=CN%3dsystem%2c+OU%3dglobal%2c+O%3dABC...
> Now URISupport will parse it, split it by "=" and decode the single parameter values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (AMQNET-393) URISupport.ParseQuery is missing decoding of parameters

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQNET-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQNET-393.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6.0

Fix applied in trunk and the NMS 1.5.x fixes branch
                
> URISupport.ParseQuery is missing decoding of parameters
> -------------------------------------------------------
>
>                 Key: AMQNET-393
>                 URL: https://issues.apache.org/jira/browse/AMQNET-393
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>            Reporter: Torsten
>            Assignee: Timothy Bish
>             Fix For: 1.6.0
>
>         Attachments: URISupportTest.cs
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The problem is the same as mentioned here: http://timbish.blogspot.de/2011/06/apachenmsactivemq-v151-released.html?showComment=1310415346797#c3045395630917744034
> If the uri contains encoded parameters the will not be correctly decoded in URISupport.ParseQuery. Hence the match of the certificates subject name fails.
> The fix should be quite simple (not tested):
> Decode the parameter in URISupport.ParseQuery :
> {noformat}
> map[nameValue[0]] = HttpUtility.UrlDecode(nameValue[1]);
> {noformat}
> Example:
> My URL Paramter Value for "tansport.clientcertsubject" ist: 
> CN=system, OU=global, O=ABC, L=Somewhere, S=State, C=com
> In the uri I added it with HttpUtility.UrlDecode() and results in the URL:
> ?serverName=communote-test-broker&transport.clientCertSubject=CN%3dsystem%2c+OU%3dglobal%2c+O%3dABC...
> Now URISupport will parse it, split it by "=" and decode the single parameter values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQNET-393) URISupport.ParseQuery is missing decoding of parameters

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQNET-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413788#comment-13413788 ] 

Timothy Bish commented on AMQNET-393:
-------------------------------------

I beleive this was already fixed in trunk for a future 1.6.0 release.  I don't think this will be applied in 1.5.x
                
> URISupport.ParseQuery is missing decoding of parameters
> -------------------------------------------------------
>
>                 Key: AMQNET-393
>                 URL: https://issues.apache.org/jira/browse/AMQNET-393
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>            Reporter: Torsten
>            Assignee: Jim Gomes
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The problem is the same as mentioned here: http://timbish.blogspot.de/2011/06/apachenmsactivemq-v151-released.html?showComment=1310415346797#c3045395630917744034
> If the uri contains encoded parameters the will not be correctly decoded in URISupport.ParseQuery. Hence the match of the certificates subject name fails.
> The fix should be quite simple (not tested):
> Decode the parameter in URISupport.ParseQuery :
> {noformat}
> map[nameValue[0]] = HttpUtility.UrlDecode(nameValue[1]);
> {noformat}
> Example:
> My URL Paramter Value for "tansport.clientcertsubject" ist: 
> CN=system, OU=global, O=ABC, L=Somewhere, S=State, C=com
> In the uri I added it with HttpUtility.UrlDecode() and results in the URL:
> ?serverName=communote-test-broker&transport.clientCertSubject=CN%3dsystem%2c+OU%3dglobal%2c+O%3dABC...
> Now URISupport will parse it, split it by "=" and decode the single parameter values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira