* split cutuserkey() out of makeuserkey(); its name doesn't show that theres a modifi...
[citadel.git] / citadel / modules / managesieve / serv_managesieve.c
index 5c0e02030a29fbc58c4ac177709d21b06cb0d1cf..e963781046295cdbd863e6d1b97e2693b486a745 100644 (file)
@@ -243,11 +243,12 @@ void cmd_mgsve_auth(int num_parms, char **parms, struct sdm_userdata *u)
                if (login_ok == CtdlLoginExistingUser(NULL, username))
                {
                        char *pass;
+
                        pass = &(auth[strlen(auth)+1]);
                        /* for some reason the php script sends us the username twice. y? */
                        pass = &(pass[strlen(pass)+1]);
                        
-                       if (pass_ok == CtdlTryPassword(pass))
+                       if (pass_ok == CtdlTryPassword(pass, strlen(pass)))
                        {
                                MGSVE->command_state = mgsve_password;
                                cprintf("OK\r\n");