-
Notifications
You must be signed in to change notification settings - Fork 987
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
Fixes #10577 - Handle login csrf token expiry nicely #7832
Conversation
Issues: #10577 |
# Called from ActionController::RequestForgeryProtection, overrides | ||
# nullify session which is the default behavior for unverified requests in Rails 3. | ||
# On Rails 4 we can get rid of this and use the strategy ':exception'. | ||
def handle_unverified_request | ||
raise ::Foreman::Exception.new(N_("Invalid authenticity token")) | ||
end |
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.
About time we got rid of this now that we are on rails 6 :)
@@ -473,15 +473,15 @@ def user_set?(field) | |||
|
|||
def notifications | |||
content_tag :div, id: 'toast-notifications-container', | |||
'data-notifications': toast_notifiations_data.to_json.html_safe do | |||
'data-notifications': toast_notifications_data.to_json.html_safe do |
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.
This and the rest below are just typo fixed i noticed while working on this pr.
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, let's wait for the tests to pass.
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.
Thanks, works great 👍
Merged, thanks, @tbrisker! |
Fixes #10577 - Handle login csrf token expiry nicely (theforeman#7832) (cherry picked from commit e0d14b3)
To test-