issue tracker -passwords with special characters ! and #

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
billos
TestLink user
Posts: 8
Joined: Fri Oct 30, 2015 7:01 am

issue tracker -passwords with special characters ! and #

Post 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?
billos
TestLink user
Posts: 8
Joined: Fri Oct 30, 2015 7:01 am

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

Post 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
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

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

Post by fman »

Project guidelines requires that issues will be reported on mantis not on forum
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

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

Post by fman »

just tested with testlink.atlassian.net, user: testlink.jira password: yyy!yyy
issue tracker check on TestLink passed OK
TurboPT
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

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

Post 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.
billos
TestLink user
Posts: 8
Joined: Fri Oct 30, 2015 7:01 am

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

Post 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
TurboPT
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

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

Post 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(&).
billos
TestLink user
Posts: 8
Joined: Fri Oct 30, 2015 7:01 am

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

Post 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.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

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

Post 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
billos
TestLink user
Posts: 8
Joined: Fri Oct 30, 2015 7:01 am

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

Post 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.
billos
TestLink user
Posts: 8
Joined: Fri Oct 30, 2015 7:01 am

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

Post 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.
billos
TestLink user
Posts: 8
Joined: Fri Oct 30, 2015 7:01 am

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

Post by billos »

Anyway it's working now you can close this post
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

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

Post by fman »

would you mind to explain how you have fixed it?
It will be useful for other people in future
Post Reply