Merge pull request #18752 from MauricioFauth/webauthn-lib-v4 #1090
Annotations
1 error and 10 warnings
|
src/Plugins/TwoFactor/WebAuthn.php#L64
Escaped Mutant for Mutator "Ternary":
--- Original
+++ New
@@ @@
}
private function createServer() : Server
{
- return class_exists(PublicKeyCredential::class) ? new WebauthnLibServer($this->twofactor) : new CustomServer();
+ return class_exists(PublicKeyCredential::class) ? new CustomServer() : new WebauthnLibServer($this->twofactor);
}
public function setServer(Server $server) : void
{
|
src/WebAuthn/WebauthnLibServer.php#L65
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function __construct(private TwoFactor $twofactor)
{
$this->coseAlgorithmManagerFactory = new ManagerFactory();
- $this->coseAlgorithmManagerFactory->add('RS1', new RSA\RS1());
+
$this->coseAlgorithmManagerFactory->add('RS256', new RSA\RS256());
$this->coseAlgorithmManagerFactory->add('RS384', new RSA\RS384());
$this->coseAlgorithmManagerFactory->add('RS512', new RSA\RS512());
|
src/WebAuthn/WebauthnLibServer.php#L67
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->coseAlgorithmManagerFactory = new ManagerFactory();
$this->coseAlgorithmManagerFactory->add('RS1', new RSA\RS1());
$this->coseAlgorithmManagerFactory->add('RS256', new RSA\RS256());
- $this->coseAlgorithmManagerFactory->add('RS384', new RSA\RS384());
+
$this->coseAlgorithmManagerFactory->add('RS512', new RSA\RS512());
$this->coseAlgorithmManagerFactory->add('PS256', new RSA\PS256());
$this->coseAlgorithmManagerFactory->add('PS384', new RSA\PS384());
|
src/WebAuthn/WebauthnLibServer.php#L70
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->coseAlgorithmManagerFactory->add('RS384', new RSA\RS384());
$this->coseAlgorithmManagerFactory->add('RS512', new RSA\RS512());
$this->coseAlgorithmManagerFactory->add('PS256', new RSA\PS256());
- $this->coseAlgorithmManagerFactory->add('PS384', new RSA\PS384());
+
$this->coseAlgorithmManagerFactory->add('PS512', new RSA\PS512());
$this->coseAlgorithmManagerFactory->add('ES256', new ECDSA\ES256());
$this->coseAlgorithmManagerFactory->add('ES256K', new ECDSA\ES256K());
|
src/WebAuthn/WebauthnLibServer.php#L73
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->coseAlgorithmManagerFactory->add('PS384', new RSA\PS384());
$this->coseAlgorithmManagerFactory->add('PS512', new RSA\PS512());
$this->coseAlgorithmManagerFactory->add('ES256', new ECDSA\ES256());
- $this->coseAlgorithmManagerFactory->add('ES256K', new ECDSA\ES256K());
+
$this->coseAlgorithmManagerFactory->add('ES384', new ECDSA\ES384());
$this->coseAlgorithmManagerFactory->add('ES512', new ECDSA\ES512());
$this->coseAlgorithmManagerFactory->add('Ed25519', new EdDSA\Ed25519());
|
src/WebAuthn/WebauthnLibServer.php#L74
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->coseAlgorithmManagerFactory->add('PS512', new RSA\PS512());
$this->coseAlgorithmManagerFactory->add('ES256', new ECDSA\ES256());
$this->coseAlgorithmManagerFactory->add('ES256K', new ECDSA\ES256K());
- $this->coseAlgorithmManagerFactory->add('ES384', new ECDSA\ES384());
+
$this->coseAlgorithmManagerFactory->add('ES512', new ECDSA\ES512());
$this->coseAlgorithmManagerFactory->add('Ed25519', new EdDSA\Ed25519());
$this->selectedAlgorithms = ['RS256', 'RS512', 'PS256', 'PS512', 'ES256', 'ES512', 'Ed25519'];
|
src/WebAuthn/WebauthnLibServer.php#L78
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
$this->coseAlgorithmManagerFactory->add('ES384', new ECDSA\ES384());
$this->coseAlgorithmManagerFactory->add('ES512', new ECDSA\ES512());
$this->coseAlgorithmManagerFactory->add('Ed25519', new EdDSA\Ed25519());
- $this->selectedAlgorithms = ['RS256', 'RS512', 'PS256', 'PS512', 'ES256', 'ES512', 'Ed25519'];
+ $this->selectedAlgorithms = ['RS512', 'PS256', 'PS512', 'ES256', 'ES512', 'Ed25519'];
}
/** @inheritdoc */
public function getCredentialCreationOptions(string $userName, string $userId, string $relyingPartyId) : array
|
src/WebAuthn/WebauthnLibServer.php#L203
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$requestOptions = PublicKeyCredentialRequestOptions::createFromArray(['challenge' => $challenge, 'allowCredentials' => $allowedCredentials, 'rpId' => $host, 'timeout' => 60000]);
Assert::isInstanceOf($requestOptions, PublicKeyCredentialRequestOptions::class);
$attestationStatementSupportManager = new AttestationStatementSupportManager();
- $attestationStatementSupportManager->add(new NoneAttestationStatementSupport());
+
$attestationObjectLoader = AttestationObjectLoader::create($attestationStatementSupportManager);
$publicKeyCredentialLoader = PublicKeyCredentialLoader::create($attestationObjectLoader);
$assertionResponseDecoded = json_decode($assertionResponseJson, true, flags: JSON_THROW_ON_ERROR);
|
src/WebAuthn/WebauthnLibServer.php#L227
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$assertionResponseDecoded['response']['clientDataJSON'] = sodium_bin2base64(sodium_base642bin($assertionResponseDecoded['response']['clientDataJSON'], SODIUM_BASE64_VARIANT_ORIGINAL), SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING);
$publicKeyCredential = $publicKeyCredentialLoader->load(json_encode($assertionResponseDecoded, JSON_THROW_ON_ERROR));
$authenticatorResponse = $publicKeyCredential->getResponse();
- Assert::isInstanceOf($authenticatorResponse, AuthenticatorAssertionResponse::class, 'Not an authenticator assertion response');
+
$authenticatorAssertionResponseValidator = new AuthenticatorAssertionResponseValidator($publicKeyCredentialSourceRepository, new IgnoreTokenBindingHandler(), new ExtensionOutputCheckerHandler(), $this->coseAlgorithmManagerFactory->generate(...$this->selectedAlgorithms));
$authenticatorAssertionResponseValidator->check($publicKeyCredential->getRawId(), $authenticatorResponse, $requestOptions, $request, $userEntity->getId());
}
|
src/WebAuthn/WebauthnLibServer.php#L291
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$credentialCreationOptions = PublicKeyCredentialCreationOptions::createFromArray($creationOptionsArray);
Assert::isInstanceOf($credentialCreationOptions, PublicKeyCredentialCreationOptions::class);
$attestationStatementSupportManager = new AttestationStatementSupportManager();
- $attestationStatementSupportManager->add(new NoneAttestationStatementSupport());
+
$attestationObjectLoader = AttestationObjectLoader::create($attestationStatementSupportManager);
$publicKeyCredentialLoader = PublicKeyCredentialLoader::create($attestationObjectLoader);
$attestationResponseDecoded = json_decode($attestationResponse, true, flags: JSON_THROW_ON_ERROR);
|
The logs for this run have expired and are no longer available.
Loading