yubikey
yubikey copied to clipboard
Deprecated warning utf8_encode
Using this code
$otp = $_GET['otp'];
$validator = new Validate(
$secret,
$id
);
try {
$response = $validator->check($otp);
}
catch (\Exception) {
die('Access denied!');
}
if ($response->success()) {
die('Access granted!');
}
else {
die('Access denied!');
}
yields the following response
Deprecated: Function utf8_encode() is deprecated in /var/www/html/vendor/enygma/yubikey/src/Yubikey/Validate.php on line 257
Deprecated: Function utf8_encode() is deprecated in /var/www/html/vendor/enygma/yubikey/src/Yubikey/Validate.php on line 257
Access granted!
I am using PHP 8.2 and enygma/yubikey 3.6