Аутентификация OpenID входит в странный цикл ошибок (Ruby on Rails, ruby-openid, open_id_authentication) - PullRequest
0 голосов
/ 11 января 2009

Некоторое время я использовал 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 голосов
/ 04 февраля 2009

Обновление до последней версии ruby-openid, open_id_authentication и Rails 2.2.2 исправило это!

Спасибо за предложения.

...