google-code-export / rubycas-client

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

CAS::Filter.guess_service(controller) cannot rebuild query from nested params(Hash object). #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. when request params is "article[title]=rubycas-client&article[body]
=useful".
2. Rails build hash object from this params.
3. CAS::Filter.guess_service cannot rebuild this params to currect query 
string.

What is the expected output? What do you see instead?
  CAS::Filter.guess_service rebuild correct query string.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by sakaz...@gmail.com on 16 Nov 2006 at 1:31

GoogleCodeExporter commented 9 years ago
adhoc routine.
reverse CGIMethods.parse_query_parameters(query_string)

h = {:article => {:title => "cas", :body =>"is good", :comments => {:owner 
=> "tester", :comment => "this is a comment"}}, :action=>"login"}
p CAS::Filter.rebuild(h)
## => ["article[title]=cas", "article[body]=is good", 
"article[comments][comment]
=this is a comment", "article[comments][owner]=tester", "action=login"]

Original comment by sakaz...@gmail.com on 16 Nov 2006 at 6:48

Attachments:

GoogleCodeExporter commented 9 years ago
ok thank you, will take a look

Original comment by matt.zuk...@gmail.com on 16 Nov 2006 at 9:09

GoogleCodeExporter commented 9 years ago
additional update in test.rb

"#{key}=#{val}" should be "#{key}=#{CGI.escape(val)}".

Original comment by sakaz...@gmail.com on 17 Nov 2006 at 1:51

GoogleCodeExporter commented 9 years ago
Just to let you know -- I haven't forgotten about this, but been really busy 
with
other things. I'm hoping to address this next week when I'll be doing some other
integration work with RubyCAS at my day job.

Original comment by matt.zuk...@gmail.com on 30 Nov 2006 at 6:04

GoogleCodeExporter commented 9 years ago
sakazuki, I can't seem to confirm this bug.

I've tried setting my service URI to
"http://my.app.com?article[title]=rubycas-client&article[body]=useful" and 
everything
works fine. The service URI is correctly decoded after it comes back from CAS.

Are you sure your CAS server is dealing with the URI correctly? We are using the
JA-SIG 3.0 implementation here, and as I said, everything seems to be working 
fine.

Original comment by matt.zuk...@gmail.com on 1 Dec 2006 at 12:34

GoogleCodeExporter commented 9 years ago

Original comment by matt.zuk...@gmail.com on 1 Dec 2006 at 12:38

GoogleCodeExporter commented 9 years ago
Request flow.

User --(a)-->[[Rails --(b)-->rubycas_client]]--(c)-->CAS

(a) ?article[title]=rubycas-client&article[body]=useful"
(b) @params = {:article => {:title => "rubycas-client", :body => "useful"}
(c) ?article=bodyusefultitlerubycas-client

Original comment by sakaz...@gmail.com on 6 Dec 2006 at 4:04

GoogleCodeExporter commented 9 years ago
alright I think I've got it... please expect a new release of the CAS client
addressing this in the next few days

Original comment by matt.zuk...@gmail.com on 6 Dec 2006 at 5:30

GoogleCodeExporter commented 9 years ago
Alright I've checked in a bunch of code into the repository. Please try 
installing
the plugin from svn and verify that the problem has been fixed.

To install:

 ./script/plugin install -x http://rubycas-client.googlecode.com/svn/trunk/rubycas-client

Original comment by matt.zuk...@gmail.com on 6 Dec 2006 at 8:03