Exploit databaseDownload repository ZIP
GH-8c7f0e4b0e998904a1d6f7dcd99e3e7d
d-xuan/cve-2024-52510
Sources for CVE-2024-52510
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files5
d-xuan/cve-2024-52510Revision 6c0d89756ae0
- ↑..Parent directory
- CertificateTrustPath.php
- EcdaaKeyIdTrustPath.php
- EmptyTrustPath.php
- TrustPath.php
- TrustPathLoader.php
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
3rdparty/web-auth/webauthn-lib/src/TrustPath/TrustPathLoader.php
PHP · 995 bytes<?php
declare(strict_types=1);
namespace Webauthn\TrustPath;
use Webauthn\Exception\InvalidTrustPathException;
use function array_key_exists;
use function class_implements;
use function in_array;
final class TrustPathLoader
{
/**
* @param mixed[] $data
*/
public static function loadTrustPath(array $data): TrustPath
{
array_key_exists('type', $data) || throw InvalidTrustPathException::create('The trust path type is missing');
$type = $data['type'];
if (class_exists($type) !== true) {
throw InvalidTrustPathException::create(
sprintf('The trust path type "%s" is not supported', $data['type'])
);
}
$implements = class_implements($type);
if (in_array(TrustPath::class, $implements, true)) {
return $type::createFromArray($data);
}
throw InvalidTrustPathException::create(sprintf('The trust path type "%s" is not supported', $data['type']));
}
}