openid_complete should normalize the claimed_id before calling openid_discovery with it.

See OpenID Authentication 2.0 Section 11.2. - Verifying Discovered Information.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

Priority: Normal » Critical
c960657’s picture

Status: Active » Needs review
FileSize
7.64 KB
Dries’s picture

Needs to be rerolled because of other OpenID patches going in.

Dries’s picture

#2: openid-normalize-1.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, openid-normalize-1.patch, failed testing.

c960657’s picture

Status: Needs work » Needs review
FileSize
7.85 KB
Dries’s picture

Status: Needs review » Fixed

Looks solid, and I like the extra tests. Committed to CVS HEAD. Another critical bug bites the dust.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

c960657’s picture

Version: 7.x-dev » 6.x-dev
Status: Closed (fixed) » Needs review
FileSize
2.1 KB

This is a straight backport for D6.

mfb’s picture

Status: Needs review » Needs work

The last submitted patch, openid-normalize-D6-1.patch, failed testing.

c960657’s picture

Status: Needs work » Needs review
FileSize
2.28 KB

Reroll.

Status: Needs review » Needs work

The last submitted patch, openid-normalize-D6-2.patch, failed testing.

c960657’s picture

Status: Needs work » Needs review

Patch still applies. The testbot has an issue with D6 patches at the moment (#961172).

wojtha’s picture

#12: openid-normalize-D6-2.patch queued for re-testing.

wojtha’s picture

This "critical fix" introduced probably more critical bug in D7 #1076366-12: OpenID discovery spec violation - fragments are removed from claimed id . Fortunately it has not been commited to D6 yet.

+++ modules/openid/openid.module	23 Nov 2010 23:17:20 -0000
@@ -234,24 +234,30 @@ function openid_complete($response = arr
+            $response['openid.claimed_id'] = _openid_normalize($response['openid.claimed_id']);

This is wrong, now you are stripping the fragment which is important for identifier recycling. Claimed ID "SHOULD" be stored with this fragment by the Relying party as specs are saying.

Powered by Dreditor.

c960657’s picture

Status: Needs review » Needs work

By reading the spec it is not very clear that you have to normalize the identifier before doing discovery.

@Heine, is this bug report based on a concrete problem with some OpenID provider?

Heine’s picture

No, and you are right it is not clear. They way I read it now, I'm in doubt.

wojtha’s picture

@Heine: yop, it is slightly uncertain and doubtful and we are not alone in those doubts. Some Openid libraries (JanRain) only strips fragment part and some Openid libraries (Zend Framework) normalize the claimed id as you have requested in the issue description. Most of the libraries only strips the fragment AFAIK.

Me and c960657 were discussing the fragment part stripping/url normalization here: #1076366-15: OpenID discovery spec violation - fragments are removed from claimed id

dpearcefl’s picture

Is this issue fixed in the latest D6? is there any interest in pursuing this issue?

wojtha’s picture

This "critical fix" introduced probably more critical bug in D7 #1076366-12: OpenID discovery spec violation - fragments are removed from claimed id . Fortunately it has not been commited to D6 yet.

I'm now focusing to fix the bug introduced by this issue to the D7, after that I can try to fix this... The current patch here is wrong and contains another criticitical error.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.