Skip to content
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

Session always expiring after the httpauth-login process #20

Open
emersonkfuri opened this issue Nov 3, 2014 · 0 comments
Open

Session always expiring after the httpauth-login process #20

emersonkfuri opened this issue Nov 3, 2014 · 0 comments

Comments

@emersonkfuri
Copy link

Hello,

Using Redmine 2.6, after logged in, every session was set as expired, as you can see bellow:

Started GET "/redmine/httpauth-login" for 999.999.999.999 at 2014-11-03 15:30:02 -0200
Processing by WelcomeController#index as HTML
Current user: user6 (id=6)
Rendered welcome/index.html.erb within layouts/base (80.1ms)
Completed 200 OK in 179.2ms (Views: 96.5ms | ActiveRecord: 67.4ms)
Started GET "/redmine/admin" for 999.999.999.999 at 2014-11-03 15:30:05 -0200
Processing by AdminController#index as HTML
Redirected to https://XXXXXX/redmine/login
Filter chain halted as :session_expiration rendered or redirected
Completed 302 Found in 6.7ms (ActiveRecord: 2.7ms)

After I check the application_controller.rb controller and the session_expiration filter, on the session_expired? method I realized that the attributes session[:ctime] and session[:atime] was not set properly.

So, I modified the http_auth_patch.rb and on the do_login method I added
session[:ctime] = Time.now.utc.to_i
session[:atime] = Time.now.utc.to_i
and the plugin started to work properly.

I dont know if I have done right because I am not a Ruby/Rails/Redmine devel. So please, if I am wrong, just ignore it.. :-)

Bye.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant