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

Bug 368211

Summary: Gerrit connector doesn't correctly recognize sign in failures
Product: z_Archived Reporter: Ryan Wooden <rygwdn>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 0.9   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Ryan Wooden CLA 2012-01-09 22:17:37 EST
Build Identifier: Version: 3.7.1 Build id: M20110909-1335

In the GerritHttpClient, there is:

if (locationHeader != null) {
(locationHeader.getValue().endsWith("#/SignInFailure,SIGN_IN,Session cookie not available.")) {
...

I am connecting to a gerrit server which redirects to: "#SignInFailure,SIGN_IN,Session cookie not available."

The result is that I always get a login failure when trying to connect to the server. Could it be simplified to: "SignInFailure,SIGN_IN,Session cookie not available." to recognize both?

The server I'm connecting to is internal, so I can't provide a link, or reproduction steps.

Reproducible: Always

Steps to Reproduce:
1. Add task repository for gerrit code review
2. Put in internal gerrit repo URL with username and password
3. Click "Validate Settings"
Comment 1 Steffen Pingel CLA 2012-01-10 03:24:48 EST
Thanks for the bug report. Looking at GerritHttpClient:413 I see this code:  locationHeader.getValue().endsWith("#SignInFailure,SIGN_IN,Session cookie not available.") . Are you using the latest version of the Gerrit connector?
Comment 2 Ryan Wooden CLA 2012-01-10 07:06:21 EST
Sorry about that, I swapped the two URLs by accident. What I meant to say was that the code has "#SignInFailure,SIGN_IN,Session cookie not available.", but the server redirects to "#/SignInFailure,SIGN_IN,Session cookie not available.".
Comment 3 Steffen Pingel CLA 2012-01-10 10:31:49 EST
Thanks for clarifying. Would you be interested in contributing a patch to fix the problem?
Comment 4 Steffen Pingel CLA 2012-01-14 09:10:20 EST
I have changed the code to "locationHeader.getValue().endsWith("SignInFailure,SIGN_IN,Session cookie not available.")". Please reopen if the problem persists after updating to next week's weekly build: http://eclipse.org/mylyn/downloads/#weekly.
Comment 5 Steffen Pingel CLA 2012-01-14 09:10:23 EST
Created attachment 209497 [details]
mylyn/context/zip