Skip to content

Commit cf7fc00

Browse files
author
AlexanderPavlenko
committed
disallow empty state
1 parent 9029a4a commit cf7fc00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/omniauth/strategies/oauth2.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def callback_phase
6363
if request.params['error'] || request.params['error_reason']
6464
raise CallbackError.new(request.params['error'], request.params['error_description'] || request.params['error_reason'], request.params['error_uri'])
6565
end
66-
if request.params['state'] != session.delete('omniauth.state')
66+
if request.params['state'].to_s.empty? || request.params['state'] != session.delete('omniauth.state')
6767
raise CallbackError.new(nil, :csrf_detected)
6868
end
6969

0 commit comments

Comments
 (0)