Merge pull request #15670 from CartoDB/15669_fix_expired_session_error

fix raise exception
pull/15672/head
Alberto Romeu 4 years ago committed by GitHub
commit 8ab5f13aa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -29,7 +29,7 @@ class ApplicationController < ActionController::Base
rescue_from NoHTML5Compliant, :with => :no_html5_compliant
rescue_from ActiveRecord::RecordNotFound, RecordNotFound, with: :render_404
rescue_from(Carto::ExpiredSessionError) { |e| rescue_from_carto_error(e) }
rescue_from Carto::ExpiredSessionError, with: :rescue_from_carto_error
ME_ENDPOINT_COOKIE = :_cartodb_base_url
IGNORE_PATHS_FOR_CHECK_USER_STATE = %w(maintenance_mode lockout login logout unauthenticated multifactor_authentication).freeze

@ -14,7 +14,7 @@ module Carto
return false unless session.key?(:sec_token)
return true if session[:sec_token] == user.security_token
raise Carto::ExpiredSessionError
raise Carto::ExpiredSessionError.new
rescue Warden::NotAuthenticated
false
end

Loading…
Cancel
Save