* text client: try the user's password with and without strproc() processing. This...
authorArt Cancro <ajc@citadel.org>
Wed, 17 Feb 2010 17:29:05 +0000 (17:29 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 17 Feb 2010 17:29:05 +0000 (17:29 +0000)
citadel/textclient/citadel.c

index ba6d6103fa736f66cac48af8fca26943ba7c39ed..a50b8a85f96ec7f47428e7999aa60b2ff00b5340 100644 (file)
@@ -1691,12 +1691,19 @@ int main(int argc, char **argv)
        } else {
                newprompt("\rPlease enter your password: ", password, -19);
        }
-       strproc(password);
 
        if (*nonce) {
                r = CtdlIPCTryApopPassword(ipc, make_apop_string(password, nonce, hexstring, sizeof hexstring), aaa);
+               if (r / 100 != 2) {
+                       strproc(password);
+                       r = CtdlIPCTryApopPassword(ipc, make_apop_string(password, nonce, hexstring, sizeof hexstring), aaa);
+               }
        } else {
                r = CtdlIPCTryPassword(ipc, password, aaa);
+               if (r / 100 != 2) {
+                       strproc(password);
+                       r = CtdlIPCTryPassword(ipc, password, aaa);
+               }
        }
        
        if (r / 100 == 2) {