2009-01-11 70 views
0

我一直在爲我的網站使用OpenID,並且一切都工作正常。但是,最近我在錯誤日誌中看到了一些奇怪的錯誤。顯然,對於用戶來說一切正常,並且他們能夠登錄。但是,在後臺,OpenID庫似乎進入了一個導致大量錯誤的循環。OpenID身份驗證進入奇怪的錯誤循環(Ruby on Rails,ruby-openid,open_id_authentication)

此外,它只發生在我不在localhost上訪問時:3000如果我通過我的DynDns名稱隧道請求,我得到的錯誤。如果我來自本地主機: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"=>"[email protected]", "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/ 
+0

您是否嘗試將插件更新爲最新版本? 只是想猜測..什麼不假設爲零?可能它無法加載用戶? – sikachu 2009-01-11 19:20:12

回答

0

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

感謝您的建議。