]> code.citadel.org Git - citadel.git/commitdiff
* serv_imap.c: fail with a "BAD" error response if the LOGIN command is
authorArt Cancro <ajc@citadel.org>
Fri, 7 Jan 2005 03:05:04 +0000 (03:05 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 7 Jan 2005 03:05:04 +0000 (03:05 +0000)
  called with the wrong number of parameters (otherwise it goes boom)
* user_ops.c: CtdlLoginExistingUser() was calling strproc() on the supplied
  name, which killed the ability to log in with your email address (because
  it stripped the @ symbol).  Changed it to striplt() instead.

citadel/ChangeLog
citadel/serv_imap.c
citadel/user_ops.c

index 1525618b84e407e7b1b35b4c0d6a3505631b753c..308edfdb59e238823f89e7109c5320f02dbf2a8a 100644 (file)
@@ -1,4 +1,11 @@
  $Log$
+ Revision 629.1  2005/01/07 03:05:04  ajc
+ * serv_imap.c: fail with a "BAD" error response if the LOGIN command is
+   called with the wrong number of parameters (otherwise it goes boom)
+ * user_ops.c: CtdlLoginExistingUser() was calling strproc() on the supplied
+   name, which killed the ability to log in with your email address (because
+   it stripped the @ symbol).  Changed it to striplt() instead.
+
  Revision 629.0  2005/01/04 03:57:32  ajc
  * THIS IS 6.29
 
@@ -6251,4 +6258,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index c6e3cc7140f9560886925842f67ede7d2e3d2dbd..3412eb638eb75b3862ef8f74b62f2c882dfc3332 100644 (file)
@@ -365,6 +365,11 @@ void imap_greeting(void)
  */
 void imap_login(int num_parms, char *parms[])
 {
+       if (num_parms != 4) {
+               cprintf("%s BAD incorrect number of parameters\r\n", parms[0]);
+               return;
+       }
+
        if (CtdlLoginExistingUser(parms[2]) == login_ok) {
                if (CtdlTryPassword(parms[3]) == pass_ok) {
                        cprintf("%s OK login successful\r\n", parms[0]);
index 77f5f86030ca20d09e3cf334b74d93d569a26ccc..211907a48ea1ef4b3a4d79e6134e815f8417936e 100644 (file)
@@ -359,7 +359,7 @@ int CtdlLoginExistingUser(char *trythisname)
 
        if (trythisname == NULL) return login_not_found;
        safestrncpy(username, trythisname, USERNAME_SIZE);
-       strproc(username);
+       striplt(username);
 
        if ((CC->logged_in)) {
                return login_already_logged_in;