-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix infinite redirect by clean up expired session #55
base: master
Are you sure you want to change the base?
Conversation
Hope this would be merged ASAP |
Any updates? Wold be really really nice if this will be merged |
I've implemented this but still hit the same infinite redirect :-( |
Have you clean up the browser cache when testing this? It is possible some cookies / session from previous version is still stored on the browser. |
Not sure if my users did that. Will check with them. |
this hits me also all the time... will try this too and report back if it works |
Hey Guys, after having used this a couple of months in production, have to say it doesnt solve the issue :( |
Hi @ataraxus , Thank you for checking, is it possible for you to provide some logs? We have use the patch for about a year now and we have not got any issue, but if you can provide some logs that will be great, I can do some checks. Best Regards, |
I've been running into the same issues like @ataraxus |
What I've found so far: A user gets redirected to our OpenID server due to
|
Hi @electrical , Thank you for the logs, can I also know your plugin config also? I just want to know if Cheers |
@galupa config:
Interestingly enough the plugin saves things in a weird way. 'false' is still true :) |
@galupa do you have any ideas on this? Thanks! |
Hi, Apologies, I have been busy lately, but I think I know what the problem is, I will take a look at it some times this week and will update. Cheers |
Wonderful. thank you! |
fix logic to allow not using login selector
fbb856f
to
3de60b2
Compare
Hi @electrical , I have made some changes, looks like the previous code is working because we are enabling the login selector, and my previous fix is fail if the login selector is disabled. I have do some testing and it should work now but please check it if you have some time, and let me know if the problem still happening. Best Regards, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you. Which version of redmine is applicable |
I am using version 4.1.x at the moment, I think it should be still compatible on version 4.2.x but I have not properly tested it against it. |
Actually there is already a PR for Redmine 5 so it should work on Redmine 5 now. |
Hi All, does anyone knows who can Merge this PR? |
Have you tried check the Cheers |
thank you,i Created a new issue:#77 |
Hi, is there anything blocking this from merging? |
Hi, I hope that fix our Redmine access .... |
We seems to have the same redirect loop issue, but it is not triggered by session expiration:
In our case session expiration was not enabled, so something else is triggering this. |
@galupa , I tested the code and it worked as expected. I still don't know why not to do the merge |
Hi, Same problem here. I apply the patch on a browser that is encountered the problem. After applying everithing is working like a charm. Thank you @galupa |
We applied this PR and the problem is gone. We know that with some browsers and/or operating systems the problem does not manifest itself much. For example, MacOS with Safari (I believe) is not affected as much as Fedora Linux 38 with Firefox. In any case this PR solves a genuine issue that affects many. So far I have not seen any issues with this fix. |
Hi,
This should fix infinite redirect problem when session lifetime is set up on Redmine.
From what I see the problem is after the session is expired, Redmine will redirect to login page because it detects the session is expired and on the login page it also check whether the client have any session and check if the session is expired or not, if it is it will redirect to login page and it will repeat it infinitely.
By default Redmine is clean up session if there any changes on user, in this case when the session is expired, Redmine should set the user as null which will reset the session, however since this plugin overwrite the
logged_user
, it does not clean up the session, that is why the expired user session will keep lingering and it cause the redirection.What I do in this PR is just clean up the session when Redmine detect the session is expired (it will call
require_login
) and also call the defaultlogged_user
if the logged user is not ioc user. The second one is not mandatory but it can be a good guard if the system allow both oic user and Redmine internal user.Please check it.
Best Regards,
Rangga