Page 1 of 1

issue tracker -passwords with special characters ! and #

Posted: Wed Nov 25, 2015 3:45 pm
by billos
This may have been addressed elesewhere but I can't find it

I am trying to connect to JIRA using a user with a ! (exclamation mark) in the password.
e.g:
< Issue Tracker>
<Password>xxx!xxxx</password>

I have tried enclosing the password in single quotes, double quotes, escaping but no success.

I have already tested the actual connection works fine for other users without these characters in the password

Also when I try direct from the command line it works in single quotes e.g

$ https --auth user:'xxx!xxx' company.atlassian.net/api/2/browse/CD-20202
returns the expected html

Can anyone provide insight?

Re: issue tracker -passwords with special characters ! and #

Posted: Wed Nov 25, 2015 4:10 pm
by billos
p.s I've tried encoding it as as &#33; but still get the "something is preventing your connection message" in test execution

Re: issue tracker -passwords with special characters ! and #

Posted: Wed Nov 25, 2015 7:06 pm
by fman
Project guidelines requires that issues will be reported on mantis not on forum

Re: issue tracker -passwords with special characters ! and #

Posted: Wed Nov 25, 2015 8:49 pm
by fman
just tested with testlink.atlassian.net, user: testlink.jira password: yyy!yyy
issue tracker check on TestLink passed OK

Re: issue tracker -passwords with special characters ! and #

Posted: Fri Nov 27, 2015 5:12 pm
by TurboPT
billos wrote: < Issue Tracker>
<Password>xxx!xxxx</password>
...
Can anyone provide insight?
Could be that your tag name does NOT match case:
<Password>xxx!xxxx</password>
You might want to check other tags for same situation.

Re: issue tracker -passwords with special characters ! and #

Posted: Thu Dec 03, 2015 7:29 pm
by billos
TurboPT wrote:
billos wrote: < Issue Tracker>
<Password>xxx!xxxx</password>
...
Can anyone provide insight?
Could be that your tag name does NOT match case:
<Password>xxx!xxxx</password>
You might want to check other tags for same situation.
The tags are matched.
it ids definitely the ! that's doing it when I do nothing except use an alternative password it works.

what's the way to escape the !
inside <password>xxx!xxx</password>
I tried single quotes double quotes, /\ // and /'/
at the cli i can simply put the password in single quotes and it works.
https --auth usernamet:'xxx!xxx'' user.atlassian.net/browse/CD-######

I know fman said it worked but I cannot get it to work

Re: issue tracker -passwords with special characters ! and #

Posted: Thu Dec 03, 2015 11:01 pm
by TurboPT
billos wrote: The tags are matched.
it ids definitely the ! that's doing it when I do nothing except use an alternative password it works.

what's the way to escape the !
inside <password>xxx!xxx</password>
I tried single quotes double quotes, /\ // and /'/
at the cli i can simply put the password in single quotes and it works.
https --auth usernamet:'xxx!xxx'' user.atlassian.net/browse/CD-######

I know fman said it worked but I cannot get it to work
...but your cli example has a quoting mismatch??
billos wrote: https --auth usernamet:'xxx!xxx'' user.atlassian.net/browse/CD-######
There appears to be two single quotes on the right-hand side of the password, likely a typo?

Anyway, at http://www.xmlvalidation.com, I put this sample into the validator:

Code: Select all

<list>
<password>xxx!xxx</password>
</list>
Then, after clicking the 'validate' button, the response was:
xmlvalidation.com wrote: No errors were found
...so I'm not sure why your system seems to be having trouble. Perhaps your admin can help?

Bottom line is, that NO escaping is needed in XML for ! and #.
There are only 5 "special characters" to XML: single-quote, double-quote, less-than(<), greater-than(>), and the ampersand(&).

Re: issue tracker -passwords with special characters ! and #

Posted: Fri Dec 04, 2015 1:34 pm
by billos
Thanks. yes the quote mismatch is simply a typo here.
I din't think it was neccessary to escape it and as I said earlier I've tried it with the html &#33;
bottom line is I am the admin for this install, of testlink. If it was just me I'd simply change the password, but we use ldap so I have no way of controlling the passwords. Oh well I'll keep plugging away.
Thanks for the help.

Re: issue tracker -passwords with special characters ! and #

Posted: Fri Dec 04, 2015 4:40 pm
by fman
IMHO the right solution is to create a SYSTEM ACCOUNT ON JIAT to be used as the User used to manage integration with JIRA e TESTLINK via API.
For this account PASSWORD EXPIRATION NEED TO BE SETTED TO NEVER

My test confirm that issue with password yyy!yyy does not exist

Re: issue tracker -passwords with special characters ! and #

Posted: Thu Dec 10, 2015 6:57 pm
by billos
fman wrote:IMHO the right solution is to create a SYSTEM ACCOUNT ON JIAT to be used as the User used to manage integration with JIRA e TESTLINK via API.
For this account PASSWORD EXPIRATION NEED TO BE SETTED TO NEVER

My test confirm that issue with password yyy!yyy does not exist
we figured it out. The password is not the problem.

So before testlink will try to get the bug info it checks to make sure it's logged in.
It tested the login by running a JIRA rest request "user/search/?username="
which, in both PHP and Python, returns ''
Since that was '', testlink assumed that the JIRA connection was dead and there we are.
So I changed it to request a list of statuses instead.

Re: issue tracker -passwords with special characters ! and #

Posted: Thu Dec 10, 2015 6:59 pm
by billos
fman wrote:IMHO the right solution is to create a SYSTEM ACCOUNT ON JIAT to be used as the User used to manage integration with JIRA e TESTLINK via API.
For this account PASSWORD EXPIRATION NEED TO BE SETTED TO NEVER

My test confirm that issue with password yyy!yyy does not exist

yes that's exactly what we were trying to do our user is the "special" user on Jira.

Re: issue tracker -passwords with special characters ! and #

Posted: Thu Dec 10, 2015 7:00 pm
by billos
Anyway it's working now you can close this post

Re: issue tracker -passwords with special characters ! and #

Posted: Thu Dec 10, 2015 9:48 pm
by fman
would you mind to explain how you have fixed it?
It will be useful for other people in future