From 92e8ce97f6f76c2930f91c14effedc8a91daf159 Mon Sep 17 00:00:00 2001 From: Harsh Singh <143034341+singhharsh1708@users.noreply.github.com> Date: Fri, 27 Nov 2026 05:29:27 +0530 Subject: [PATCH] fix: role form limits the name input to the 64 characters its column stores (#8385) --- tests/php/test_role_name_maxlength.php | 17 +++++++++++++++++ web/skins/classic/views/role.php | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 tests/php/test_role_name_maxlength.php diff --git a/tests/php/test_role_name_maxlength.php b/tests/php/test_role_name_maxlength.php new file mode 100644 index 0000000000..8b5bddaf2d --- /dev/null +++ b/tests/php/test_role_name_maxlength.php @@ -0,0 +1,17 @@ +/s', 'PHP', $text); + +preg_match_all('/]*name="role\[Name\]"[^>]*>/i', $text, $m); +$ok = count($m[0]) === 1 && preg_match('/\bmaxlength\s*=\s*["\']?64\b/', $m[0][0]); +echo ($ok ? 'ok' : 'FAIL')." - role name input has maxlength 64\n"; +echo $ok ? "\n1 passed, 0 failed\n" : "\n0 passed, 1 failed\n"; +exit($ok ? 0 : 1); diff --git a/web/skins/classic/views/role.php b/web/skins/classic/views/role.php index c702af9702..5e0acdb2d6 100644 --- a/web/skins/classic/views/role.php +++ b/web/skins/classic/views/role.php @@ -73,7 +73,7 @@ echo getNavBarHTML(); - +