private method `gsub' called for nil:NilClass
Closed this issue · 2 comments
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:in hash_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:in hash_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:in hash_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:in logout' 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
... and of course it works for 1.9.3, not 1.8.7
Oops, this is meant to be on ruby-casclient