FIX: Convert omniauth authenticator names to symbols before comparing

This is necessary because some auth plugins define their name as a string
This commit is contained in:
David Taylor 2019-08-14 12:57:11 +01:00
parent 5755d3886f
commit f4aa6096ab
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class Middleware::OmniauthBypassMiddleware
CSRFTokenVerifier.new.call(env) if request.request_method.downcase.to_sym != :get
# Check whether the authenticator is enabled
if !Discourse.enabled_authenticators.any? { |a| a.name == env['omniauth.strategy'].name }
if !Discourse.enabled_authenticators.any? { |a| a.name.to_sym == env['omniauth.strategy'].name.to_sym }
raise AuthenticatorDisabled
end