From 01e7cf0556f95e6b78dc1339b2cec387bc5c8d17 Mon Sep 17 00:00:00 2001 From: Jon Stovell Date: Sun, 3 Feb 2019 23:32:00 -0700 Subject: [PATCH] Checks that label index is an integer Signed-off-by: Jon Stovell --- Sources/PersonalMessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/PersonalMessage.php b/Sources/PersonalMessage.php index 78178400a7..d7193aa4c0 100644 --- a/Sources/PersonalMessage.php +++ b/Sources/PersonalMessage.php @@ -3810,7 +3810,7 @@ function ManageRules() foreach ($_POST['acttype'] as $ind => $type) { // Picking a valid label? - if ($type == 'lab' && (!isset($_POST['labdef'][$ind]) || !isset($context['labels'][$_POST['labdef'][$ind]]))) + if ($type == 'lab' && (!ctype_digit((string) $ind) || !isset($_POST['labdef'][$ind]) || !isset($context['labels'][$_POST['labdef'][$ind]]))) continue; // Record what we're doing.