From: Art Cancro Date: Fri, 23 May 2008 03:02:09 +0000 (+0000) Subject: AOL's OpenID implementation sucks. X-Git-Tag: v7.86~2221 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=f150d988bd5ddc0933574cfa777f1887929e0dad;p=citadel.git AOL's OpenID implementation sucks. --- diff --git a/citadel/modules/openid/serv_openid_rp.c b/citadel/modules/openid/serv_openid_rp.c index 19b63e0db..b30d594f0 100644 --- a/citadel/modules/openid/serv_openid_rp.c +++ b/citadel/modules/openid/serv_openid_rp.c @@ -214,6 +214,7 @@ void delete_assoc_handle(void *data) { if (data) free(data); } + /* * Process the response from an "associate" request */ @@ -404,18 +405,25 @@ void cmd_oids(char *argbuf) { */ void cmd_oidf(char *argbuf) { char assoc_handle[256]; + char invalidate_handle[256]; struct associate_handle *h = NULL; extract_token(assoc_handle, argbuf, 0, '|', sizeof assoc_handle); + extract_token(invalidate_handle, argbuf, 1, '|', sizeof assoc_handle); if (GetHash(HL, assoc_handle, strlen(assoc_handle), (void *)&h)) { - cprintf("%d handle %s is good\n", CIT_OK, assoc_handle); + cprintf("%d handle is good\n", CIT_OK); // FIXME now do something with it } else { - cprintf("%d handle %s not found\n", ERROR, assoc_handle); + if (GetHash(HL, invalidate_handle, strlen(invalidate_handle), (void *)&h)) { + cprintf("%d assoc_handle not found, but invalidate_handle was found\n", ERROR); + } + else { + cprintf("%d neither assoc_handle nor invalidate_handle found, wtf?\n", ERROR); + } } } diff --git a/webcit/auth.c b/webcit/auth.c index eb18ed39b..023c54e55 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -325,7 +325,10 @@ void finalize_openid_login(void) // openid.sig = [28] vixxxU4MAqWfxxxxCfrHv3TxxxhEw= // FIXME id accepted but the code isn't finished - serv_printf("OIDF %s", bstr("openid.assoc_handle")); + serv_printf("OIDF %s|%s", + bstr("openid.assoc_handle"), + bstr("openid.invalidate_handle") + ); serv_getln(buf, sizeof buf); display_openid_login(buf); return;