* split cutuserkey() out of makeuserkey(); its name doesn't show that theres a modifi...
[citadel.git] / citadel / modules / managesieve / serv_managesieve.c
index da56429ce73439d5d84cdb56ec4bc8904e389b39..e963781046295cdbd863e6d1b97e2693b486a745 100644 (file)
@@ -62,7 +62,6 @@
 #include "config.h"
 #include "control.h"
 #include "user_ops.h"
-#include "policy.h"
 #include "database.h"
 #include "msgbase.h"
 #include "internet_addressing.h"
@@ -244,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");