add namespace validation

This commit is contained in:
ghost 2023-12-09 21:15:25 +02:00
parent 7c51f3d57a
commit a733f151e9

View File

@ -184,6 +184,12 @@ class AppExtension extends AbstractExtension
string $namespace
): string
{
// Validate namespace supported to continue
if (!preg_match('/^[A-z0-9]{34}$/', $namespace))
{
return $namespace;
}
// Connect kevacoin
$client = new \Kevachat\Kevacoin\Client(
$this->container->getParameter('app.kevacoin.protocol'),