Skip to content

Commit

Permalink
Handle session ID being nil in auth_callback (pupilfirst#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
harigopal authored Dec 18, 2023
1 parent c92c6ac commit 7d02d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def auth_callback
session_id = Base64.urlsafe_decode64(data[:session_id])

# Abort if the session is invalid
if session_id.to_s != session.id.private_id.to_s
if session.id.nil? || session_id.to_s != session.id.private_id.to_s
flash[:error] = t(".invalid_session")
redirect_to new_user_session_path
return
Expand Down

0 comments on commit 7d02d7f

Please sign in to comment.