From 575a34c6ac1d37f52e26027f71fc5db925b8a35c Mon Sep 17 00:00:00 2001 From: Torben Hansen Date: Sat, 5 Jan 2019 12:21:09 +0100 Subject: [PATCH] [TASK] Minor CGL changes --- Classes/YubikeyAuth.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/YubikeyAuth.php b/Classes/YubikeyAuth.php index 57afa49..6cb0842 100644 --- a/Classes/YubikeyAuth.php +++ b/Classes/YubikeyAuth.php @@ -58,7 +58,7 @@ public function checkOtp($yubikeyOtp) $ret = false; $otp = trim($yubikeyOtp); - // Verify if the OTP is valid ? + // Verify if the OTP is valid if ($this->verifyOtp($otp)) { $ret = true; } @@ -106,7 +106,6 @@ public function verifyHmac($response, $yubicoApiKey) */ public function verifyOtp($otp) { - // Get the global API ID/KEY $yubicoApiId = trim($this->getConfig('yubikeyClientId')); $yubicoApiKey = trim($this->getConfig('yubikeyClientKey')); @@ -132,6 +131,7 @@ public function verifyOtp($otp) ); $signature = preg_replace('/\+/', '%2B', $signature); $parameters .= '&h=' . $signature; + $urls = []; foreach ($apiUrls as $apiUrl) { $urls[] = $apiUrl . '?' . $parameters; } @@ -148,6 +148,7 @@ public function verifyOtp($otp) } $mh = curl_multi_init(); + $connections = []; foreach ($urls as $i => $url) { $connections[$i] = curl_init($url); $curlOptions[CURLOPT_URL] = $url;