About 2 or 3 months ago, folks who had been using Livejournal's openid to authenticate for crankypenguin stopped being able to use it. LJ responds with this error:

This is an OpenID server endpoint, not a human-readable resource. For more information, see http://openid.net/.

Crankypenguin is running 6.12, but I have tried this out on a vanilla install of 6.19 and have the same error.

I did some digging and found http://status.net/open-source/issues/2659 - which indicates a change in openID. I discussed with merlinofchaos before opening this issue :)

jcfiala also had an issue open with LJ over it (which I added the same information to, but hey, NO HELP THERE), so there's more than one of us, but admittedly it's probably a pretty small base of people having this issue.

Comments

merlinofchaos’s picture

Version: 6.19 » 7.x-dev
Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new664 bytes

Based upon the information that status.net had, changing the "post" to a "get" on the form that redirects appears to be all that's necessary.

The attached patch is working for our site using openid with livejournal. It applies cleanly to both D7 and D6.

Since this bug makes openid non-functional with one of the core open id providers I'm upgrading this to major.

sin’s picture

I'm having this issue. Can't authenticate using livejournal.com, tried several Drupal 6 sites. The patch fixes the problem. Already patched 2 sites. Thanks!

damien tournoud’s picture

Hm. Has someone opened an issue against the Livejournal implementation? Not accepting POST for an indirect communication is definitely against the spec.

For those wondering, it seems that OpenID switched from simple 302 redirects to either GET or POST redirects mainly to work around browsers limitations to the length of URLs [1].

[1] http://stackoverflow.com/questions/34623/why-is-html-form-redirection-us...

sun’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +Needs backport to D7

Pinged @wojtha in IRC in the hope for a final decision on how to move forward here.

wojtha’s picture

@sun l'll need to do some research, so I'm putting this in my personal queue...

wojtha’s picture

Status: Needs review » Needs work
Issue tags: +Needs backport to D7

The last submitted patch, 965718-openid-broken-with-livejournal.patch, failed testing.

quicksketch’s picture

Status: Needs work » Needs review
StatusFileSize
new479 bytes

Reroll for Drupal 7/8. Patch above in #1 should still apply to Drupal 6.

Reading over the linked post in #3, the only reason you *wouldn't* use GET is if you're sending over a large amount of information in the query string. Considering Drupal core's Open ID implementation is only for authentication (not for attribute exchange or anything fancy like that), we shouldn't have any problems with this patch.

xjm’s picture

Tagging issues not yet using summary template.

catch’s picture

Status: Needs review » Needs work

It's a shame this has stalled, I see the following that could be done, they are not mutually exclusive:

- just switch to GET instead of POST - if we do that we need a comment to explain why, so marking CNW.
- open a bug report against LiveJournal somewhere for not following the spec and wait for them to fix it.

Bojhan.core’s picture

Issue tags: +Quick fix

Todo's seem clear.

esmerel’s picture

Note the OP - there was an issue posted with LJ over it :/ they aren't particularly interested in fixing it, it seems. I could find the issue if it's necessary.

damien tournoud’s picture

Issue tags: -Quick fix

Let's implement GET-or-POST based on the size of the payload (FYI: 2000 bytes is widely considered a maximum size for an URL).

wojtha’s picture

#12 esmerel... LJ, lazy bastards...

#13 Damien, yup, that finally sounds like a plan!

c960657’s picture

The bug on Livejournal has been fixed now:
http://code.livejournal.org/trac/livejournal/changeset/18185

But the bug in the underlying Perl library is still unresolved:
https://rt.cpan.org/Public/Bug/Display.html?id=42202

Using GET when possible (URL longer than 2000 bytes) is probably a good thing anyway (at least there is nothing in the OpenID spec that advices against it). It allows us to skip the intermediate page (flash of white) before redirecting to the OpenID Provider.

catch’s picture

Priority: Major » Normal

If LiveJournal beat us to it, this feels no longer major to me, although still worth doing the switch on 2000 bytes I think.

c960657’s picture

Status: Needs work » Needs review
StatusFileSize
new16.04 KB

With this patch we only use POST when needed (= if we are running OpenID 2.x, and the length of the GET URL would exceed the maximum URL length supported by MSIE).

Status: Needs review » Needs work
Issue tags: -Needs issue summary update, -Needs backport to D7

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

c960657’s picture

Status: Needs work » Needs review

#17: openid-redirect-1.patch queued for re-testing.

Status: Needs review » Needs work

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

c960657’s picture

Status: Needs work » Needs review
Issue tags: +Needs issue summary update, +Needs backport to D7

#17: openid-redirect-1.patch queued for re-testing.

c960657’s picture

FYI this issue is sort of the counterpart of #1295096: With Clean URLs enabled: Undefined index: QUERY_STRING in _openid_response() (line 561 of .../modules/openid/openid.inc). That issue is about accepting both GET and POST on the Relying Party (i.e. Drupal) when the user is redirected from the Drupal site to the OpenID Provider, and this issue is about using either GET or POST when the user is redirected the other way, i.e. from the Drupal site to the OpenID Provider.

c960657’s picture

StatusFileSize
new16.06 KB

Reroll.

Status: Needs review » Needs work

The last submitted patch, openid-redirect-2.patch, failed testing.

c960657’s picture

Assigned: Unassigned » c960657
Status: Needs work » Needs review
StatusFileSize
new16.1 KB

Status: Needs review » Needs work
Issue tags: -Needs issue summary update, -Needs backport to D7

The last submitted patch, openid-redirect-3.patch, failed testing.

c960657’s picture

Status: Needs work » Needs review
Issue tags: +Needs issue summary update, +Needs backport to D7

#25: openid-redirect-3.patch queued for re-testing.

c960657’s picture

StatusFileSize
new15.82 KB

Reroll.

c960657’s picture

StatusFileSize
new15.82 KB

Here is a reroll for your reviewing pleasure :-)

swentel’s picture

Version: 8.x-dev » 7.x-dev
Issue tags: -Needs backport to D7

open id module is gone in D8

mgifford’s picture

Assigned: c960657 » Unassigned
Issue summary: View changes
Status: Needs review » Needs work

Patch no longer applies.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.