Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 195251

Summary: [web connector] Login request URL and password with &
Product: z_Archived Reporter: samuel Liard <samuel>
Component: MylynAssignee: Eugene Kuleshov <ekuleshov>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description samuel Liard CLA 2007-07-03 08:29:01 EDT
To create postRequest in WebRepositoryConnector.loginRequestIfNeeded(), you write : 
				String[] requestParams = loginRequestUrl.substring(n + 1).split("&");

But if a password content a '&' that didn't work (where ever if we use &amp;)

For example :
Login Request URL = ${serverUrl}/account/login.php?return_to=&form_loginname=${userId}&form_pw=${password}&login=Login&stay_in_ssl=1
and POST mode

login : mylogin
pass : p&ass
so real url can be : http://www.example.com/account/login.php?return_to=&form_loginname=mylogin&form_pw=p&amp;ass&login=Login&stay_in_ssl=1

In this case Post request parameter are wrong.
Comment 1 Eugene Kuleshov CLA 2007-07-03 10:15:51 EDT
I'll look into that. In a mean time, as a workaround you can use GET method and replace & with &amp; in your password.
Comment 2 Eugene Kuleshov CLA 2007-07-04 13:33:06 EDT
Please disregard my previous comment. The workaround would be to use %26 instead of & inside password or any other field.

Anyways, I've committed fix to CVS, please reopen this issue if you still see this after next dev build (should be released this Friday).
Comment 3 Eugene Kuleshov CLA 2007-07-04 13:33:07 EDT
Created attachment 73046 [details]
mylyn/context/zip