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

Stoiko Ivanov s.ivanov at proxmox.com
Wed Feb 14 07:22:35 CET 2024


applied both patches (sadly overlooking Gabriel's testing and review -
sorry) - Thanks!.

If you want to further cleanup that area - aligning the regular expressions
and lengths for 'userid' (<10 lines above your changes) and testing it
might help causing less confusion for further changes in this part of code.


On Tue, Sep 05, 2023 at 02:54:43PM +0200, Maximiliano Sandoval wrote:
> 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
> 
> 
> 
> _______________________________________________
> pmg-devel mailing list
> pmg-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
> 
> 




More information about the pmg-devel mailing list