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.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | openid-fragment-normalization-D6-1.patch | 869 bytes | c960657 |
| #10 | openid-fragment-normalization-3.patch | 7.34 KB | c960657 |
| #7 | do575805-openid-fragment-normalization.patch | 2.61 KB | heine |
| #5 | do575805-openid-fragment-normalization.patch | 2.64 KB | heine |
| #4 | do575805-openid-fragment-normalization.patch | 2.11 KB | heine |
Comments
Comment #1
heine commentedAnyone willing to supply a test?
Comment #2
webchickTagging.
Comment #3
heine commentedWell, 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...
Comment #4
heine commentedLet'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.
Comment #5
heine commentedAdded missing hunk.
Comment #6
c960657 commentedThe two last tests miss an ending period in the message. Apart from that it looks good.
Comment #7
heine commentedAdded periods.
Comment #8
c960657 commentedAnother 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)
Comment #10
c960657 commentedComment #11
dries commentedCommitted to CVS. Thanks for the tests.
Comment #12
c960657 commentedD6 backport.
Comment #13
alex_b commentedTested, works as expected. RTBC
Comment #14
gábor hojtsyThanks, committed.
Comment #15
pwolanin commentedDoes this need to be backported to the D5 contrib module?
Comment #16
c960657 commentedYes, I think a backport for D5 is relevant. The D6 patch applies to the D5 contrib module with just a small offset.