[pmg-devel] [PATCH pmg-api 1/2] fix #4818: utils: Don't set minLength for username

Maximiliano Sandoval m.sandoval at proxmox.com
Tue Sep 5 14:54:43 CEST 2023


This matches pve-access-control/src/PVE/Auth/Plugin.pm.

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 src/PMG/Utils.pm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/PMG/Utils.pm b/src/PMG/Utils.pm
index c19b31f..88dcff7 100644
--- a/src/PMG/Utils.pm
+++ b/src/PMG/Utils.pm
@@ -110,8 +110,7 @@ PVE::JSONSchema::register_standard_option('userid', {
 PVE::JSONSchema::register_standard_option('username', {
     description => "Username (without realm)",
     type => 'string',
-    pattern => '[^\s:\/\@]{3,60}',
-    minLength => 4,
+    pattern => '[^\s:\/\@]{1,60}',
     maxLength => 64,
 });
 
-- 
2.39.2





More information about the pmg-devel mailing list