You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Callback processing is broken when Object monkeypatched with Object#info (etc) #898
Provider Gem: omniauth-google-oauth2 v1.3.1 (but applies to all)
Ruby Version: 2.3.3
Framework: rails 4 (any)
Platform: OSX (any)
Expected Behavior
If one (perhaps inadvertently) defines Object#info (or #info on any module in global scope) (or #uid, #extra or #credentials), then Omniauth should function normally.
Actual Behavior
An exception is thrown in Strategy#compile_stack which calls &ancestor.send(:info) and Object#info does not return a proc. This is due to this method walking all ancestors expecting them to quack like Strategy (I think) and failing if their #info method does something else.
I fully agree that these monkey patches shouldn't exist, but they can do and will result in a hard to trace error.
Steps to Reproduce
Please list all steps to reproduce the issue.
Define a module
module Crazy
def info(s)
Rails.logger.info(s)
end
end
Include at top level
include Crazy
Attempt to test the Omniauth callback
get '/oauth2/callback'
Caveat
Several people wrote the code that made this happen, I only made the test...
Activity
Only compile fetcher stacks from strategy classes