Skip to content
Snippets Groups Projects
Unverified Commit d68aa84d authored by Pavel Břoušek's avatar Pavel Břoušek Committed by GitHub
Browse files

fix: prevent undefined index warning

not all challenges have the attributes field (e.g. TOTP)
parent ea43ac7d
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,10 @@ class PIResponse
$tmp->message = $challenge['message'];
$tmp->serial = $challenge['serial'];
$tmp->type = $challenge['type'];
$tmp->attributes = $challenge['attributes'];
if (isset($challenge['attributes']))
{
$tmp->attributes = $challenge['attributes'];
}
if ($tmp->type === "webauthn")
{
......@@ -216,4 +219,4 @@ class PIResponse
}
return $ret;
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment