google-code-export / rubycas-client

Automatically exported from code.google.com/p/rubycas-client
1 stars 1 forks source link

TypeError (instance of IO needed) after login #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This could be a yaml problem

What steps will reproduce the problem?
1. Install plugin via GIT
2. Set cas-server and restart the server
3. when entering the page, the redirect to the cas server works great, but 
after login i get this

TypeError (instance of IO needed):
  /opt/local/lib/ruby/1.8/yaml.rb:133:in `load'
  /opt/local/lib/ruby/1.8/yaml.rb:133:in `load'

What is the expected output? What do you see instead?
The parsed Simple example template

What version of the product are you using? On what operating system?
Newest from git. 
Rails 2.1.2, 2.2.2, 2.3.3.
ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.1.0]

Please provide any additional information below.
The response from the CAS-server seems okay. Its even contain extra information 
about the 
user.

More stack trace:
/opt/local/lib/ruby/1.8/yaml.rb:133:in `load'
/opt/local/lib/ruby/1.8/yaml.rb:133:in `load'
/railsapp/vendor/plugins/rubycas-client/lib/casclient/responses.rb:74:in `parse'
/railsapp/vendor/plugins/rubycas-client/lib/casclient/responses.rb:73:in `each'
/railsapp/vendor/plugins/rubycas-client/lib/casclient/responses.rb:73:in `parse'
/railsapp/vendor/plugins/rubycas-client/lib/casclient/responses.rb:35:in 
`initialize'
/railsapp/vendor/plugins/rubycas-client/lib/casclient/client.rb:232:in `new'
/railsapp/vendor/plugins/rubycas-client/lib/casclient/client.rb:232:in 
`request_cas_response'
/railsapp/vendor/plugins/rubycas-client/lib/casclient/client.rb:93:in 
`validate_service_ticket'
/railsapp/vendor/plugins/rubycas-client/lib/casclient/frameworks/rails/filter.rb
:51:in `filter'

Original issue reported on code.google.com by powerla...@gmail.com on 29 Jul 2009 at 11:30

GoogleCodeExporter commented 9 years ago
The problem was in responses.rb:74, that the answer from the client could not 
be parsed by YAML.
So after out commit thise lines, it works fine.
        # unserialize extra attributes
        # @extra_attributes.each do |k, v|
        #           @extra_attributes[k] = YAML.load(v)
        #         end

But then there was a session store problem. Because line 77 in filter.rb adds a 
lots of extra data to the session
# controller.session[:cas_last_valid_ticket] = st

That can also be removed, but maybe not a good solution. Maybe I shoud just 
change the session store.

Original comment by powerla...@gmail.com on 29 Jul 2009 at 2:15

GoogleCodeExporter commented 9 years ago
What session store are you using? Cookie?

Original comment by matt.zuk...@gmail.com on 18 Aug 2009 at 4:47

GoogleCodeExporter commented 9 years ago

Original comment by matt.zuk...@gmail.com on 18 Aug 2009 at 4:47