Thomas Conté created PROTON-1131:

             Summary: Improve URL parsing for usernames containing an at "@" 
                 Key: PROTON-1131
             Project: Qpid Proton
          Issue Type: Improvement
          Components: proton-c
            Reporter: Thomas Conté
            Priority: Minor

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:


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
<   char *at = strchr(url, '@');
>   char *at = strrchr(url, '@');

This message was sent by Atlassian JIRA

Reply via email to