You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Vavricka <va...@gmail.com> on 2017/09/13 06:44:52 UTC

[Qpid JMS Client] Password with '+' character

Hi,

  I am facing an issue when connecting to Qpid C++ broker with Qpid JMS
client (AMQP 1.0) when jms.password property in connection string contains
'+' character.

  Qpid JMS Client - 0.24.0
  Qpid C++ broker - 0.34

 Connection strings I tried:

  amqp://host:port?jms.username=admin&jms.password=passwith+char

  amqp://host:port?jms.username=admin&jms.password='passwith+char'

  amqp://host:port?jms.username=admin&jms.password="passwith+char"

  amqp://host:port?jms.username=admin&jms.password=passwith%2Bchar

  amqp://host:port?jms.username=admin&jms.password='passwith%2Bchar'

  Client always failed to connect. Is it possible to have '+' character in
jms.password property?

  Vavricka



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: [Qpid JMS Client] Password with '+' character

Posted by Vavricka <va...@gmail.com>.
Hi,

  when I used URLEncoder.encode(pass, "UTF-8") as used in mentioned test,
client successfully connected.

  Thanks for reply.

  Tomas



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: [Qpid JMS Client] Password with '+' character

Posted by Robbie Gemmell <ro...@gmail.com>.
We actually have a client test checking that + works, as there was a
bug in older client versions where the option values got
double-decoded, which could specifically mess with encoded + signs as
they double-decoded into a space character instead. The password would
need URI encoded with the + becoming %2B as in your 4th example.

The test is shown at:
https://github.com/apache/qpid-jms/blob/0.24.0/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SaslIntegrationTest.java#L129
I've just run it under a protocol tracer to additionally verify the
expected credential content actually went over the wire between the
client and its test peer, which it did.

The test uses PLAIN for SASL, so one potential difference from your
environment could be if another SASL mechanism was being used instead
and there was some issue with it. Alternatively, there could be an
issue with the broker side, or it could be both of those. If you make
an attempt and capture it under wireshark perhaps you can see whats
happening.

Robbie

On 13 September 2017 at 07:44, Vavricka <va...@gmail.com> wrote:
> Hi,
>
>   I am facing an issue when connecting to Qpid C++ broker with Qpid JMS
> client (AMQP 1.0) when jms.password property in connection string contains
> '+' character.
>
>   Qpid JMS Client - 0.24.0
>   Qpid C++ broker - 0.34
>
>  Connection strings I tried:
>
>   amqp://host:port?jms.username=admin&jms.password=passwith+char
>
>   amqp://host:port?jms.username=admin&jms.password='passwith+char'
>
>   amqp://host:port?jms.username=admin&jms.password="passwith+char"
>
>   amqp://host:port?jms.username=admin&jms.password=passwith%2Bchar
>
>   amqp://host:port?jms.username=admin&jms.password='passwith%2Bchar'
>
>   Client always failed to connect. Is it possible to have '+' character in
> jms.password property?
>
>   Vavricka
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org