Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368211 - Gerrit connector doesn't correctly recognize sign in failures
Summary: Gerrit connector doesn't correctly recognize sign in failures
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.9   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-09 22:17 EST by Ryan Wooden CLA
Modified: 2012-01-14 09:10 EST (History)
0 users

See Also:


Attachments
mylyn/context/zip (2.55 KB, application/octet-stream)
2012-01-14 09:10 EST, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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