Skip to content
Snippets Groups Projects
Commit 49187661 authored by Tim van Dijen's avatar Tim van Dijen Committed by Thijs Kinkhorst
Browse files

Minor optimization

parent 919a6c10
No related branches found
No related tags found
No related merge requests found
......@@ -66,12 +66,12 @@ class FilterScopes extends ProcessingFilter
$values = $request['Attributes'][$attribute];
$newValues = [];
foreach ($values as $value) {
$value_a = explode('@', $value, 2);
if (count($value_a) < 2) {
list(, $scope) = explode('@', $value, 2);
if ($scope === null) {
$newValues[] = $value;
continue; // there's no scope
}
$scope = $value_a[1];
if (in_array($scope, $validScopes, true)) {
$newValues[] = $value;
} elseif (strpos($host, $scope) === strlen($host) - strlen($scope)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment