Fixed a backwards conditional in the openid_manual_create template.
authorArt Cancro <ajc@citadel.org>
Tue, 15 Feb 2011 03:53:06 +0000 (22:53 -0500)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 14:43:12 +0000 (14:43 +0000)
webcit/auth.c
webcit/static/t/openid_manual_create.html

index 905cd8722aada3c464410efb07a3a45520088015..a1f881645ae3015d122a685ca89535215d80ef1d 100644 (file)
@@ -112,7 +112,7 @@ void become_logged_in(const StrBuf *user, const StrBuf *pass, StrBuf *serv_respo
        }
 
        WCC->axlevel = StrBufExtract_int(serv_response, 1, '|');
-       if (WCC->axlevel >= 6) { /* TODO: make this a define, else it might trick us later */
+       if (WCC->axlevel >= 6) {
                WCC->is_aide = 1;
        }
 
@@ -227,7 +227,6 @@ void openid_manual_create(void)
                        end_burst();
                }
        } else {
-
                /* Still no good!  Go back to teh dialog to select a username */
                const StrBuf *Buf;
                putbstr("__claimed_id", NewStrBufDup(sbstr("openid_url")));
@@ -446,7 +445,7 @@ void do_welcome(void)
                                buf[strlen(buf)-1] = 0;
                                fclose(fp);
                                if (atoi(buf) == serv_info.serv_rev_level) {
-                                       setup_wizard = 1; /**< already run */
+                                       setup_wizard = 1;       /* already run */
                                }
                        }
                }
@@ -486,8 +485,9 @@ void end_webcit_session(void) {
        /* close() of citadel socket will be done by do_housekeeping() */
 }
 
+
 /* 
- * execute the logout
+ * Log out the session with the Citadel server
  */
 void do_logout(void)
 {
@@ -682,7 +682,6 @@ void validate(void)
 }
 
 
-
 /*
  * Display form for registration.
  *
@@ -740,8 +739,6 @@ void display_reg(int during_login)
 }
 
 
-
-
 /*
  * display form for changing your password
  */
@@ -849,6 +846,7 @@ void changepw(void)
        }
 }
 
+
 int ConditionalHaveAccessCreateRoom(StrBuf *Target, WCTemplputParams *TP)
 {
        StrBuf *Buf;    
@@ -867,12 +865,14 @@ int ConditionalHaveAccessCreateRoom(StrBuf *Target, WCTemplputParams *TP)
        return 1;
 }
 
+
 int ConditionalAide(StrBuf *Target, WCTemplputParams *TP)
 {
        wcsession *WCC = WC;
        return (WCC != NULL) ? ((WCC->logged_in == 0)||(WC->is_aide == 0)) : 0;
 }
 
+
 int ConditionalIsLoggedIn(StrBuf *Target, WCTemplputParams *TP) 
 {
        wcsession *WCC = WC;
@@ -881,7 +881,6 @@ int ConditionalIsLoggedIn(StrBuf *Target, WCTemplputParams *TP)
 }
 
 
-
 void _display_reg(void) {
        display_reg(0);
 }
@@ -902,6 +901,7 @@ void Header_HandleAuth(StrBuf *Line, ParsedHttpHdrs *hdr)
        }
 }
 
+
 void CheckAuthBasic(ParsedHttpHdrs *hdr)
 {
 /*
@@ -918,6 +918,7 @@ void CheckAuthBasic(ParsedHttpHdrs *hdr)
 */
 }
 
+
 void GetAuthBasic(ParsedHttpHdrs *hdr)
 {
        const char *Pos = NULL;
@@ -929,6 +930,7 @@ void GetAuthBasic(ParsedHttpHdrs *hdr)
        StrBufExtract_NextToken(hdr->c_password, hdr->HR.plainauth, &Pos, ':');
 }
 
+
 void Header_HandleCookie(StrBuf *Line, ParsedHttpHdrs *hdr)
 {
        const char *pch;
@@ -955,6 +957,7 @@ void Header_HandleCookie(StrBuf *Line, ParsedHttpHdrs *hdr)
        hdr->HR.got_auth = AUTH_COOKIE;
 }
 
+
 void 
 HttpNewModule_AUTH
 (ParsedHttpHdrs *httpreq)
@@ -964,6 +967,8 @@ HttpNewModule_AUTH
        httpreq->c_roomname = NewStrBuf();
        httpreq->c_language = NewStrBuf();
 }
+
+
 void 
 HttpDetachModule_AUTH
 (ParsedHttpHdrs *httpreq)
@@ -974,6 +979,7 @@ HttpDetachModule_AUTH
        FLUSHStrBuf(httpreq->c_language);
 }
 
+
 void 
 HttpDestroyModule_AUTH
 (ParsedHttpHdrs *httpreq)
@@ -984,6 +990,7 @@ HttpDestroyModule_AUTH
        FreeStrBuf(&httpreq->c_language);
 }
 
+
 void 
 InitModule_AUTH
 (void)
@@ -995,7 +1002,6 @@ InitModule_AUTH
        /* no url pattern at all? Show login. */
        WebcitAddUrlHandler(HKEY(""), "", 0, do_welcome, ANONYMOUS|COOKIEUNNEEDED);
 
-       /* some of these will be removed soon */
        WebcitAddUrlHandler(HKEY("do_welcome"), "", 0, do_welcome, ANONYMOUS|COOKIEUNNEEDED);
        WebcitAddUrlHandler(HKEY("openid_login"), "", 0, do_openid_login, ANONYMOUS);
        WebcitAddUrlHandler(HKEY("finalize_openid_login"), "", 0, finalize_openid_login, ANONYMOUS);
index 647baa7e9d0f2f95b6ec068b88b1ebf6c23d7f00..0ab12a4582b3a8d07a0e7f6253b6417d81c22021 100644 (file)
@@ -1,11 +1,11 @@
 <div class="login_infos">
        <img src="static/openid-small.gif"><?_("Your OpenID")> <tt><?BSTR("__claimed_id", "X")></tt> <?_("was successfully verified.")><br>
-<??("COND:BSTR", 1, "__username")><?_("However, the user name")>  '<?BSTR("__username", "X")>' <?_("conflicts with an existing user.")><??("X", 1)>
+<?!("COND:BSTR", 1, "__username")><?_("However, the user name")>  '<?BSTR("__username", "X")>' <?_("conflicts with an existing user.")><??("X", 1)>
 <br>
        <?_("Please specify the user name you would like to use.")><br>
 </div>
 <form action="openid_manual_create" method="POST"  class="box" id="login_form">
-       <input type="hidden" NAME="openid_url" VALUE="<?BSTR("__claimed_id", "U")>">
+       <input type="hidden" NAME="openid_url" VALUE="<?BSTR("__claimed_id", "X")>">
         <label for="uname"><?_("User name:")></label>
         <input type="text" name="name" id="uname" > <br>
         <div class="logbuttons">