Файловый менеджер - Редактировать - /var/www/html/libraries/vendor/web-auth/webauthn-lib/src/Counter/ThrowExceptionIfInvalid.php
Ðазад
<?php declare(strict_types=1); namespace Webauthn\Counter; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use Throwable; use Webauthn\Exception\CounterException; use Webauthn\MetadataService\CanLogData; use Webauthn\PublicKeyCredentialSource; final class ThrowExceptionIfInvalid implements CounterChecker, CanLogData { public function __construct( private LoggerInterface $logger = new NullLogger() ) { } public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; } public function check(PublicKeyCredentialSource $publicKeyCredentialSource, int $currentCounter): void { try { $currentCounter > $publicKeyCredentialSource->getCounter() || throw CounterException::create( $currentCounter, $publicKeyCredentialSource->getCounter(), 'Invalid counter.' ); } catch (Throwable $throwable) { $this->logger->error('The counter is invalid', [ 'current' => $currentCounter, 'new' => $publicKeyCredentialSource->getCounter(), ]); throw $throwable; } } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка