Skip to content

Commit e0acd8a

Browse files
nathanjrobertsontvdijen
authored andcommitted
Only filter attributes if there is actually a list of allowed values to filter on (#2095)
1 parent 34c082a commit e0acd8a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

modules/core/src/Auth/Process/AttributeLimit.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,12 @@ public function process(array &$state): void
174174
continue;
175175
}
176176
} elseif (($regexpMatch = self::matchAnyRegex($name, $allowedAttributeRegex)) !== null) {
177-
$attributes[$name] = $this->filterAttributeValues(
178-
$attributes[$name],
179-
$allowedAttributeRegex[$regexpMatch]
180-
);
177+
if (array_key_exists($regexpMatch, $allowedAttributeRegex)) {
178+
$attributes[$name] = $this->filterAttributeValues(
179+
$attributes[$name],
180+
$allowedAttributeRegex[$regexpMatch]
181+
);
182+
}
181183
if (!empty($attributes[$name])) {
182184
continue;
183185
}

0 commit comments

Comments
 (0)