From 64dc187ae93877e54d452b24f54ac01239273721 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 17 Feb 2010 17:29:05 +0000 Subject: [PATCH] * 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. --- citadel/textclient/citadel.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) { -- 2.39.2