You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Justin Ross (JIRA)" <ji...@apache.org> on 2016/11/04 22:42:58 UTC

[jira] [Updated] (PROTON-1131) Improve URL parsing for usernames containing an at "@" sign

     [ https://issues.apache.org/jira/browse/PROTON-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Ross updated PROTON-1131:
--------------------------------
    Fix Version/s: Future

> Improve URL parsing for usernames containing an at "@" sign
> -----------------------------------------------------------
>
>                 Key: PROTON-1131
>                 URL: https://issues.apache.org/jira/browse/PROTON-1131
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: proton-c
>            Reporter: Thomas Conté
>            Priority: Minor
>             Fix For: Future
>
>
> In the case the username being passed via the URL contains an at sign ("@") (e.g. during SASL PLAIN authentication), the URL parsing will fail because it will take the first at sign as the mark of the host name start.
> Example URL:
> amqps://myFirstDevice@sas.tcontehub:password@tcontehub.azure-devices.net/devices/myFirstDevice/messages/events
> In this case the user name is "myFirstDevice@sas.tcontehub".
> Suggested fix: use strrchr() instead of strchr() in order to match the last occurence of an at sign, marking the start of the host name.
> $ diff ./util.c ~/qpid-proton/proton-c/src/util.c
> 167c167
> <   char *at = strchr(url, '@');
> ---
> >   char *at = strrchr(url, '@');



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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