Posted by Heine on September 12, 2009 at 11:47pm
| Project: | OpenID |
| Version: | 5.x-1.x-dev |
| Component: | OpenID Client |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
| Issue tags: | Needs tests |
Issue Summary
The OpenID 2.0 specification states on normalizing user input:
If the URL contains a fragment part, it MUST be stripped off together with the fragment delimiter character "#". See Section 11.5.2 for more information.
The current openid implementation doesn't do this.
| Attachment | Size |
|---|---|
| openid_spec_violation_fragment_identifier.patch | 724 bytes |
Comments
#1
Anyone willing to supply a test?
#2
Tagging.
#3
Well, we could go the full monty and implement normalization according to RCF 3986 section 6 as we should.
Inspiration:
http://pear.php.net/package/Net_URL2/docs/latest/__filesource/fsource_Ne...
http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Open...
#4
Let's leave the full RFC implementation to #578464: OpenID 2.0 spec violation - Normalize URL according to RFC3986 Section 6. Here's a patch for the fragment issue with a few tests.
#5
Added missing hunk.
#6
The two last tests miss an ending period in the message. Apart from that it looks good.
#7
Added periods.
#8
+ $this->assertEqual(_openid_normalize('$foo'), '$foo', t('_openid_normalize correctly normalized an XRI.'));Another nit (sorry): I think we usually refer to functions using brackets, i.e.
_openid_normalize() correctly normalized an XRI., though the other tests in that file don't follow that convention.(I think we generally need some guidelines on how to phrase the assertion message for tests)
#9
The last submitted patch failed testing.
#10
#11
Committed to CVS. Thanks for the tests.
#12
D6 backport.
#13
Tested, works as expected. RTBC
#14
Thanks, committed.
#15
Does this need to be backported to the D5 contrib module?
#16
Yes, I think a backport for D5 is relevant. The D6 patch applies to the D5 contrib module with just a small offset.