changeset 76:0c12d643f41d

added check for slash in list control string
author mortenp
date Wed, 12 May 2004 06:24:56 +1000
parents 8cc4c0a54cfd
children 66d950e9a550
files src/listcontrol.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/listcontrol.c	Wed May 12 05:52:00 2004 +1000
+++ b/src/listcontrol.c	Wed May 12 06:24:56 2004 +1000
@@ -105,6 +105,13 @@
 					(controlstr[cmdlen] == '-')) {
 				param = strdup(controlstr + cmdlen + 1);
 				MY_ASSERT(param);
+				if (strchr(param, '/')) {
+					errno = 0;
+					log_error(LOG_ARGS, "Slash (/) in"
+						" list control request,"
+						" discarding mail");
+					exit(EXIT_SUCCESS);
+				}
 				free(controlstr);
 				break;
 			} else if (!ctrl_commands[ctrl].accepts_parameter &&