takcy / openid4java

Automatically exported from code.google.com/p/openid4java
Apache License 2.0
0 stars 0 forks source link

ParameterList and line with blank. #40

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I redo a test with samples/simple-openid.
I don't know why (I'm not an jsp user) but provider.jsp add blank at the
begin of the first line for response. So without
   if (keyValue.trim().length() == 0)
   {
       continue;
   }

into ParameterList.createFromXxx(...), an error is thrown :
>org.openid4java.message.MessageException: 256: Invalid Key-Value form,
colon missing: a.message.MessageException: 256: Invalid Key-Value form,
colon missing: 
        at
org.openid4java.message.ParameterList.createFromKeyValueForm(ParameterList.java:
186)
...

And because it's a blank problem the message isn't clear.

I agree that it is a workaround, need to manage bad server response, but
the world is not perfect. Openid4java already ignore empty line (done by
Tokeninzer), why not ignore blank line ?

Original issue reported on code.google.com by david.bernard.31 on 18 Oct 2007 at 7:44

GoogleCodeExporter commented 8 years ago

Original comment by david.bernard.31 on 18 Oct 2007 at 7:09

GoogleCodeExporter commented 8 years ago
simple-openid used to work. How are you using it?

(It's not working for me at all, I've opened a different issue for that.)

Original comment by Johnny.B...@gmail.com on 18 Oct 2007 at 7:24

GoogleCodeExporter commented 8 years ago
I'm seeing now the "colon missing" in a verification response, when running 
simple-
openid in jetty. The same war file deployed in tomcat works ok. I'll look into 
it a 
bit more.

Original comment by Johnny.B...@gmail.com on 18 Oct 2007 at 9:23

GoogleCodeExporter commented 8 years ago
This should be fixed now in rev 372.

The bug was introduced in rev 369 by adding an empty line at the end of 
provider.jsp, which is then sent with direct responses, thus making them 
violate the 
key-value form defined by the spec.

David, please confirm that is also works for you, without any tweaks to the 
Parameter or ParameterList classes.

Original comment by Johnny.B...@gmail.com on 19 Oct 2007 at 7:52

GoogleCodeExporter commented 8 years ago
Works

May be adding a comment (last line) to alert futur change about empty line.

Original comment by david.bernard.31 on 19 Oct 2007 at 8:10

GoogleCodeExporter commented 8 years ago
Good idea, done!

Original comment by Johnny.B...@gmail.com on 19 Oct 2007 at 8:27