AOL's OpenID implementation sucks.
authorArt Cancro <ajc@citadel.org>
Fri, 23 May 2008 03:02:09 +0000 (03:02 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 23 May 2008 03:02:09 +0000 (03:02 +0000)
citadel/modules/openid/serv_openid_rp.c
webcit/auth.c

index 19b63e0dbaca155d51f43de774a62dc6bf2fd984..b30d594f022d6e767356517099ae9120cf02328c 100644 (file)
@@ -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);
+               }
        }
 }
 
index eb18ed39b4907cd66783a94acd1c2798809f9931..023c54e55d26fdec02e8475512addd00cce8f440 100644 (file)
@@ -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;