From: Art Cancro Date: Wed, 17 Feb 2010 17:29:05 +0000 (+0000) Subject: * text client: try the user's password with and without strproc() processing. This... X-Git-Tag: v7.86~419 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=64dc187ae93877e54d452b24f54ac01239273721;p=citadel.git * text client: try the user's password with and without strproc() processing. This will allow authentication of users in LDAP etc. who have special characters in their passwords, without breaking the sites using self-contained auth that have passwords stored (unbeknownst to the users) whose passwords went into the db stripped. Resolves bug 457. --- diff --git a/citadel/textclient/citadel.c b/citadel/textclient/citadel.c index ba6d6103f..a50b8a85f 100644 --- a/citadel/textclient/citadel.c +++ b/citadel/textclient/citadel.c @@ -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) {