Skip to content

Commit

Permalink
Ensure CSRF protection is prepended before authentication before_actions
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed Apr 12, 2021
1 parent 021955a commit cb95b05
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/trestle/auth/controller/authentication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ module Authentication

prepend_before_action :require_authenticated_user
prepend_before_action :authenticate_user

# Ensure that CSRF protection happens before authentication
protect_from_forgery prepend: true
end

protected
Expand Down

0 comments on commit cb95b05

Please sign in to comment.