Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
openid.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2008 at 22:33 UTC
Updated:
28 Sep 2009 at 15:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
cburschkaRelevant code:
Diagnosis:
$_SESSION['openid']['values']isn't set.Comment #2
cburschkaBefore the above code is executed, the function checks for the presence of
$_SESSION['openid']:This should probably be
$_SESSION['openid']['values'], although I can't quite fathom why $_SESSION['openid'] would be set if ['values'] isn't.Comment #3
cburschkaTrivial patch. I couldn't reproduce the problem, so I can't test. Normally I'd suspect there might be more to it, but as the notices seem to be the only actual issue, this should be enough.
Comment #4
blueyed commentedI think this can be reproduced as follows:
1. Login using your OpenID
2. Go to admin/user/user/create
3. See the notices
4. Inspect
$_SESSION['openid']and see that it contains the key "user_login_values"Apparently code in question is meant for the "Create new account" form, after logging in with an unknown OpenID failed (e.g. because of "invalid username", which is likely to be the normalized OpenID).
It seems to get triggered in two cases where it's not meant to be:
1. When the admin creates a new user
2. in openid/authenticate?destination=user, after returning from the provider (there is also only the key "user_login_values" - when trying to login using an unknown OpenID for the first time).
I've came up with the same fix (extended isset()) and it appears that everything works alright afterwards. I've tested:
- Login using attached OpenID
- Login using unknown OpenID, with sreg.nickname (=> Autoregister)
- Attaching an OpenID to an existing user
Comment #5
BrightLoudNoise commentedThis is still an issue in HEAD, I've re-rolled the patch for HEAD and tested it locally. I can create a separate issue if that is preferred.
Comment #7
c960657 commentedThe proposed fix was added to HEAD as part of #251245: openid.module needs tests.
Here is a backport for D6.
Comment #8
miklLooks good, thanks Christian :)
Comment #9
gábor hojtsyThanks, committed to Drupal 6.