OpenID身份验证进入奇怪的错误循环(Ruby on Rails,ruby-openid,open_id_authentication)

时间:2009-01-11 14:43:46

标签: ruby-on-rails openid ruby-openid

我已经在我的网站上使用OpenID了一段时间,一切都运行良好。但是,最近我在错误日志中看到了一些奇怪的错误。显然,一切对用户来说都很好,并且他们能够登录。但是,在后台,OpenID库似乎进入了一个导致一堆错误的循环。

此外,它只发生在我无法访问localhost时:3000如果我通过我的DynDns名称隧道请求,我收到错误。如果我来自localhost:3000,没有什么

底部是日志的片段。需要注意的主要是前几行:

No pre-discovered information supplied
Performing discovery on http://XXX.myopenid.com/

这是在初始OpenID请求后的几秒钟内发生的,并立即导致以下错误和堆栈跟踪。这会持续几次,然后停止。

任何人都知道会发生什么?

No pre-discovered information supplied
Performing discovery on http://XXX.myopenid.com/

Processing SessionsController#create (for 66.249.70.239 at 2009-01-11 09:20:38) [GET]
  Session ID: 19b48e16d003d796e4b90674b3a2b917
  Parameters: {"openid.sreg.nickname"=>"ASDF", "openid.claimed_id"=>"http://XXX.myopenid.com/", "openid.mode"=>"id_res", "openid.ns.sreg"=>"http://openid.net/extensions/sreg/1.1", "openid.return_to"=>"http://XXX.homelinux.net:3000/sessions?open_id_complete=1", "openid.sig"=>"Xs3twfOutebf5edn5eXaM0OTMko=", "openid.sreg.fullname"=>"ASDF", "openid.ns"=>"http://specs.openid.net/auth/2.0", "openid.op_endpoint"=>"http://www.myopenid.com/server", "action"=>"create", "openid.response_nonce"=>"2009-01-11T14:20:31Z20d5QU", "method"=>:get, "controller"=>"sessions", "openid.sreg.email"=>"ASDF@FDSA.com", "openid.identity"=>"http://XXX.myopenid.com/", "openid.sreg.country"=>"US", "open_id_complete"=>"1", "openid.assoc_handle"=>"{HMAC-SHA1}{4968a37c}{NUOe7g==}", "openid.signed"=>"assoc_handle,claimed_id,identity,mode,ns,ns.sreg,op_endpoint,response_nonce,return_to,signed,sreg.country,sreg.email,sreg.fullname,sreg.nickname"}
  OpenIdAuthentication::Association Load (0.002034)   SELECT * FROM `open_id_authentication_associations` WHERE (`open_id_authentication_associations`.`server_url` = 'http://www.myopenid.com/server' AND `open_id_authentication_associations`.`handle` = '{HMAC-SHA1}{4968a37c}{NUOe7g==}') 
  OpenIdAuthentication::Nonce Load (0.000717)   SELECT * FROM `open_id_authentication_nonces` WHERE (`open_id_authentication_nonces`.`server_url` = 'http://www.myopenid.com/server' AND `open_id_authentication_nonces`.`timestamp` = 1231683631 AND `open_id_authentication_nonces`.`salt` = '20d5QU') LIMIT 1


NoMethodError (You have a nil object when you didn't expect it!
The error occurred while evaluating nil.claimed_id):
    /vendor/plugins/open_id_authentication/lib/open_id_authentication.rb:107:in `complete_open_id_authentication'
    /vendor/plugins/open_id_authentication/lib/open_id_authentication.rb:88:in `authenticate_with_open_id'
    /app/controllers/sessions_controller.rb:80:in `open_id_authentication'
    /app/controllers/sessions_controller.rb:16:in `create'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in `send'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1158:in `perform_action_without_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in `call_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in `perform_action'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `send'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `process'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in `handle_request'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
    /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
    /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/mongrel.rb:64
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
    /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    script/server:3

No pre-discovered information supplied
Performing discovery on http://myid.myopenid.com/

1 个答案:

答案 0 :(得分:0)

升级到最新的ruby-openid,open_id_authentication和Rails 2.2.2修复了它!

感谢您的建议。