From e330d8f86d1347485faa947adaa57723c567b1dc Mon Sep 17 00:00:00 2001 From: Kevin Sandy Date: Mon, 17 Feb 2025 13:45:44 -0500 Subject: [PATCH] Verify attribute value is a string before calling strlen --- src/Auth/Process/AttributeAddFromLDAP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Auth/Process/AttributeAddFromLDAP.php b/src/Auth/Process/AttributeAddFromLDAP.php index 3aac2d93f..3e366fc02 100644 --- a/src/Auth/Process/AttributeAddFromLDAP.php +++ b/src/Auth/Process/AttributeAddFromLDAP.php @@ -96,7 +96,7 @@ public function process(array &$state): void foreach ($attributes as $attr => $val) { $arrSearch[] = '%' . $attr . '%'; - if (is_array($val) && count($val) > 0 && strlen($val[0]) > 0) { + if (is_array($val) && count($val) > 0 && is_string($val[0]) && strlen($val[0]) > 0) { $arrReplace[] = $this->connector->escapeFilterValue($val[0], true); } else { $arrReplace[] = '';