Attempting to access any pagure URL that ends in /settings results in a redirect loop when OIDC authentication is enabled. For example, clicking on "My Settings" after logging in results in a browser error as follows.
This page isn’t working pagure.example.com redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS There appears to be an issue with redirect loops
This error also results in the user being logged out.
I have reproduced this issue in Chrome and Opera browsers, Firefox appears to be unaffected.
Apache logs show several attempts to retrieve a token as well.
[Tue Apr 03 14:53:08.499777 2018] [:error] [pid 24408] 2018-04-03 14:53:08,499 [INFO] oauth2client.client: Successfully retrieved access token [Tue Apr 03 14:53:08.868404 2018] [:error] [pid 24731] 2018-04-03 14:53:08,868 [INFO] oauth2client.client: Successfully retrieved access token
@bkabrda said on IRC this commit https://pagure.io/pagure/c/a173048df11429dc377570a35f2aa10c3b34f9cc?branch=master should be fixing this issue.
Could you see if you have it?
We are using the 3.13.2 release which doesn't have this commit however I've copied the changes into the logout function in the init.py file as shown below.
[root@pagure2 pagure]# diff -u __init__.py __init__.py.new --- __init__.py 2018-04-04 10:39:26.663194824 -0400 +++ __init__.py.new 2018-04-04 10:39:52.376562090 -0400 @@ -266,6 +266,8 @@ if hasattr(flask.g, 'fas_user') and flask.g.fas_user is not None: FAS.logout() elif auth == 'oidc': + flask.g.fas_user = None + del flask.session['oidc_logintime'] oidc.logout() elif auth == 'local': import pagure.ui.login as login
I am now able to access account settings and project settings properly.
Ok, so let's close this as fixed in git :)
Metadata Update from @pingou: - Issue close_status updated to: Fixed
@pingou It needs to be fixed in a production release though.
Metadata Update from @wattersmt: - Issue status updated to: Open (was: Closed)
I close the ticket once they are fixed in git, it'll be in the next release :)