mirror of
https://github.com/kevachat/webapp.git
synced 2025-01-23 04:54:32 +00:00
update namespace regex
This commit is contained in:
parent
653af869bd
commit
a04a493ac3
@ -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');
|
||||
}
|
||||
|
@ -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:
|
||||
[
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user