Closed CloCkWeRX closed 12 years ago
In 2.3.9, under some circumstances it's possible to trigger the above error.
A NoMethodError occurred in agc#logout:
private method gsub' called for nil:NilClass /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/cgi.rb:342:inescape' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:285:in hash_to_query' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:285:ineach' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:285:in hash_to_query' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:283:ineach' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:283:in hash_to_query' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:96:inlogout_url' vendor/gems/rubycas-client-rails/lib/rubycas-client-rails.rb:234:in logout' lib/ruby_cas_proxy.rb:9:inlogout' app/controllers/agc/agc_controller.rb:13:in `logout'
gsub' called for nil:NilClass /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/cgi.rb:342:in
hash_to_query' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:285:in
hash_to_query' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:283:in
hash_to_query' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:96:in
logout' lib/ruby_cas_proxy.rb:9:in
It looks like https://github.com/rubycas/rubycas-client/blob/v2.3.9/lib/casclient/client.rb#L281 is somehow getting a destination_url which, when parsed, has Nil elements.
Users are typically coming from URIs like: https://foo.com/path/to/page?&sort=date_received.DESC
... and of course it works for 1.9.3, not 1.8.7
Oops, this is meant to be on ruby-casclient
In 2.3.9, under some circumstances it's possible to trigger the above error.
A NoMethodError occurred in agc#logout:
private method
gsub' called for nil:NilClass /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/1.8/cgi.rb:342:in
escape' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:285:inhash_to_query' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:285:in
each' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:285:inhash_to_query' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:283:in
each' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:283:inhash_to_query' vendor/bundle/ruby/1.8/gems/rubycas-client-2.3.9/lib/casclient/client.rb:96:in
logout_url' vendor/gems/rubycas-client-rails/lib/rubycas-client-rails.rb:234:inlogout' lib/ruby_cas_proxy.rb:9:in
logout' app/controllers/agc/agc_controller.rb:13:in `logout'It looks like https://github.com/rubycas/rubycas-client/blob/v2.3.9/lib/casclient/client.rb#L281 is somehow getting a destination_url which, when parsed, has Nil elements.
Users are typically coming from URIs like: https://foo.com/path/to/page?&sort=date_received.DESC