Skip to content
Snippets Groups Projects
Verified Commit 36c849a7 authored by Dominik Frantisek Bucik's avatar Dominik Frantisek Bucik
Browse files

fix: :bug: Potential Undefined array key in IsEinfrAssured

Fix the `process` method of `IsEinfrAssured` authproc filter to not spam
logs with undefined key if the attribute is not present in user
attributes.
parent 65fa1013
No related branches found
No related tags found
1 merge request!62fix: 🐛 Potential Undefined array key in IsEinfrAssured
Pipeline #354754 passed
......@@ -74,9 +74,9 @@ class IsEinfraAssured extends ProcessingFilter
public function process(&$request)
{
$timestamp = 0;
if (isset($request['Attributes'][$this->sessionEligibilitiesAttr][$this->eligibilityKey])) {
if (!empty($request['Attributes'][$this->sessionEligibilitiesAttr][$this->eligibilityKey])) {
$timestamp = $request['Attributes'][$this->sessionEligibilitiesAttr][$this->eligibilityKey];
} elseif (isset($request['Attributes'][$this->userEligibilitiesAttr][$this->eligibilityKey])) {
} elseif (!empty($request['Attributes'][$this->userEligibilitiesAttr][$this->eligibilityKey])) {
$timestamp = $request['Attributes'][$this->userEligibilitiesAttr][$this->eligibilityKey];
}
......
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