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

Bug 431937

Summary: [site_login] can't access download stats due to cyclic requests to login
Product: Community Reporter: Stephan Herrmann <stephan.herrmann>
Component: WebsiteAssignee: phoenix.ui <phoenix.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: chris.guindon, denis.roy, wayne.beaton
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/54226
https://git.eclipse.org/c/websites/dev.eclipse.org.git/commit/?id=1c083b27a4399f72e2a85899a25face5742d7390
Whiteboard:

Description Stephan Herrmann CLA 2014-04-03 11:48:08 EDT
Sometimes I just can't find any chain of links taking me to the eclipse servers' download statistics.

No matter if I start in the portal or the new PMI, at some point, when I select download stats, it asks me to login (again), and when I click login I'm on the "Welcome Back, Stephan!" page, where I can again select download stats, which again asks me to login, which I successfully do, and round and round.

The funny thing, sometimes it magically works, but I can't remember the secret door I took.
Comment 1 Denis Roy CLA 2015-08-19 16:06:14 EDT
Stephan, is this still happening?
Comment 2 Stephan Herrmann CLA 2015-08-19 17:26:46 EDT
I can't give a statistically relevant figure (it *sometimes* worked also before) but right now I tried:
- go to PMI
- find box "Committer Tools"
- did not find download stats option
- by some indirections I visited "Edit my account"
- there (and only there) I found a complete list of committer tools
- clicked "Download stats"
- and here we are, query page right in front of me and fully functional :)
Comment 3 Stephan Herrmann CLA 2015-08-19 17:30:48 EDT
And here's how to break it:

1 log out of eclipse.org

2 navigate to https://dev.eclipse.org/committers/committertools/stats.php

3 log in

4 find My Account page

5 click "Download stats"

6 back to 4(!)

Yes, and now it remains broken, across several different attempts made.
Comment 4 Eclipse Genie CLA 2015-08-20 09:24:46 EDT
New Gerrit change created: https://git.eclipse.org/r/54226
Comment 5 Christopher Guindon CLA 2015-08-20 10:41:50 EDT
I think the problem is browser caching.

I can reproduce this on firefox.

How to reproduce:

1. Make sure you are not logged in

2. click on the link:
https://dev.eclipse.org/committers/committertools/stats.php

3. login

4. click on the download stats link

5. redirect loop

I submitted a patch that I think will fix this issue.
Comment 6 Christopher Guindon CLA 2015-08-20 10:54:40 EDT
I am pretty sure this is the problem.

If you look at the code at https://git.eclipse.org/r/#/c/54226/1/committers/committertools/stats.php

We are setting headers for no caching but it's after:
Session = $App->useSession(true);

We are redirecting the user to the login page without the no-caching headers.

Apparently 302 redirect can be cached by the client.

We would need to deploy this patch to confirm my assumptions:
https://git.eclipse.org/r/#/c/54226
Comment 7 Denis Roy CLA 2015-08-20 10:59:33 EDT
Makes sense to me.  Push it through, I'll deploy it.
Comment 9 Christopher Guindon CLA 2015-08-20 11:04:46 EDT
I also made a commit to eclipse.org-common to keep these 2 repos in sync:

https://git.eclipse.org/c/www.eclipse.org/eclipse.org-common.git/commit/?id=011cc4b92a8ee5dacf862db62591788fe6fe3fae
Comment 10 Denis Roy CLA 2015-08-20 11:09:23 EDT
I just deployed to dev.eclipse.org.