takcy / openid4java

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

NPE for invalid Yadis URL #72

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For an invalid Yadis URL, when there is a <head> and no <meta> tag, it
throws NPE. The metaElements at the 2nd line is probably null. 
In CyberNekoDOMYadisParser:
54   NodeList metaElements = head.getElementsByTagName("META");
55        for (int i = 0, len = metaElements.getLength(); i < len; i++)

perhaps throw an exception between 54 and 55 that say META tag is not found. 

besides, I suggest to provide more information in the invalid Yadis
response exception, e.g.
"please define a meta tag with a X-XRDS-Location response-header as
required in Yadis 1.0 spec section 6.2.5"

OpenID newbies like me, who may have read the OpenID spec but not Yadis,
have no idea on what's going on when there are exceptions throw in the
background. 

Original issue reported on code.google.com by mingfai...@gmail.com on 2 Nov 2008 at 2:42

GoogleCodeExporter commented 8 years ago
Fixed in rev518. Thanks!

Original comment by Johnny.B...@gmail.com on 1 Jan 2009 at 10:49