update namespace regex

This commit is contained in:
ghost 2023-12-09 21:33:41 +02:00
parent 653af869bd
commit a04a493ac3
3 changed files with 4 additions and 4 deletions

View File

@ -108,7 +108,7 @@ class ModuleController extends AbstractController
}
// Append custom valid namespace to the rooms list menu
if (!in_array($request->get('namespace'), $list) && preg_match('/^[A-z0-9]{34}$/', $request->get('namespace')))
if (!in_array($request->get('namespace'), $list) && preg_match('/^N[A-z0-9]{33}$/', $request->get('namespace')))
{
$list[] = $request->get('namespace');
}

View File

@ -136,7 +136,7 @@ class RoomController extends AbstractController
name: 'room_namespace',
requirements:
[
'namespace' => '^[A-z0-9]{34}$',
'namespace' => '^N[A-z0-9]{33}$',
'txid' => '^[A-z0-9]{64}$',
],
defaults:
@ -298,7 +298,7 @@ class RoomController extends AbstractController
name: 'room_post',
requirements:
[
'namespace' => '^[A-z0-9]{34}$',
'namespace' => '^N[A-z0-9]{33}$',
],
methods:
[

View File

@ -185,7 +185,7 @@ class AppExtension extends AbstractExtension
): string
{
// Validate namespace supported to continue
if (!preg_match('/^[A-z0-9]{34}$/', $namespace))
if (!preg_match('/^N[A-z0-9]{33}$/', $namespace))
{
return $namespace;
}