Skip to content

Commit 06b01d9

Browse files
ks3tvdijen
authored andcommitted
Verify attribute value is a string before calling strlen (#64)
1 parent b757fe7 commit 06b01d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Auth/Process/AttributeAddFromLDAP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function process(array &$state): void
9696
foreach ($attributes as $attr => $val) {
9797
$arrSearch[] = '%' . $attr . '%';
9898

99-
if (is_array($val) && count($val) > 0 && strlen($val[0]) > 0) {
99+
if (is_array($val) && count($val) > 0 && is_string($val[0]) && strlen($val[0]) > 0) {
100100
$arrReplace[] = $this->connector->escapeFilterValue($val[0], true);
101101
} else {
102102
$arrReplace[] = '';

0 commit comments

Comments
 (0)