Skip to content

Commit 2e77a14

Browse files
michieldsuelaP
authored andcommitted
#20221 - make sure exclude list IDs are numerical
1 parent 74e574c commit 2e77a14

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

public_html/lists/admin/lib.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,17 @@ function setMessageData($msgid, $name, $value)
114114
}
115115
}
116116
}
117+
if ($name == 'excludelist' && is_array($value)) {
118+
## make sure all entries are numerical. @@TO(DO We could also check that they are actually valid list IDs
119+
$newLists = array();
120+
foreach ($value as $v) {
121+
if (is_numeric($v)) {
122+
$newLists[] = $v;
123+
}
124+
}
125+
$value = $newLists;
126+
unset($newLists);
127+
}
117128
if (is_array($value) || is_object($value)) {
118129
$value = 'SER:'.serialize($value);
119130
}

0 commit comments

Comments
 (0)