* $Id$
*
* IMAP server for the Citadel system
- * Copyright (C) 2000-2007 by Art Cancro and others.
+ * Copyright (C) 2000-2009 by Art Cancro and others.
* This code is released under the terms of the GNU General Public License.
*
* WARNING: the IMAP protocol is badly designed. No implementation of it
* is perfect. Indeed, with so much gratuitous complexity, *all* IMAP
* implementations have bugs.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sysdep.h"
char pass[256];
int result;
+ memset(pass, 0, sizeof(pass));
CtdlDecodeBase64(decoded_authstring, cmd, strlen(cmd));
safestrncpy(ident, decoded_authstring, sizeof ident);
safestrncpy(user, &decoded_authstring[strlen(ident) + 1], sizeof user);
{
char buf[SIZ];
+ memset(buf, 0, sizeof(buf));
CtdlDecodeBase64(buf, cmd, SIZ);
if (CtdlTryPassword(buf) == pass_ok) {
cprintf("%s OK authentication succeeded\r\n", IMAP->authseq);
int newroomview = 0;
char *notification_message = NULL;
+ if (num_parms < 3) {
+ cprintf("%s NO A foder name must be specified\r\n", parms[0]);
+ return;
+ }
+
if (strchr(parms[2], '\\') != NULL) {
- cprintf("%s NO Invalid character in folder name\r\n",
- parms[0]);
+ cprintf("%s NO Invalid character in folder name\r\n", parms[0]);
CtdlLogPrintf(CTDL_DEBUG, "invalid character in folder name\n");
return;
}