Skip to content

Commit

Permalink
fix bug when user not found on signing in and captcha conditions met
Browse files Browse the repository at this point in the history
  • Loading branch information
mercedesb committed Mar 17, 2023
1 parent abc517f commit e7b8f9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/sessions_controller.rb
Expand Up @@ -12,7 +12,7 @@ class SessionsController < Clearance::SessionsController

def create
@user = find_user
if !valid_privacy_pass_redemption? && HcaptchaVerifier.should_verify_sign_in?(who)
if @user && !valid_privacy_pass_redemption? && HcaptchaVerifier.should_verify_sign_in?(who)
setup_captcha_verification
render "sessions/captcha"
elsif @user && (@user.mfa_enabled? || @user.webauthn_credentials.any?)
Expand Down

0 comments on commit e7b8f9f

Please sign in to comment.