public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: Maximiliano Sandoval <m.sandoval@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied-series: [PATCH pmg-api 1/2] fix #4818: utils: Don't set minLength for username
Date: Wed, 14 Feb 2024 07:22:35 +0100	[thread overview]
Message-ID: <ZcxcK31o7OmGAq77@rosa.proxmox.com> (raw)
In-Reply-To: <20230905125444.731999-1-m.sandoval@proxmox.com>

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@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@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
> 
> 




  parent reply	other threads:[~2024-02-14  6:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 12:54 [pmg-devel] " Maximiliano Sandoval
2023-09-05 12:54 ` [pmg-devel] [PATCH pmg-gui 2/2] fix #4818: Revert "UserEdit: add minLength of 4 to username field" Maximiliano Sandoval
2024-02-13 16:19 ` [pmg-devel] [PATCH pmg-api 1/2] fix #4818: utils: Don't set minLength for username Gabriel Goller
2024-02-14  6:22 ` Stoiko Ivanov [this message]
2024-02-14 10:20   ` [pmg-devel] applied-series: " Maximiliano Sandoval
2024-02-14 10:42     ` Maximiliano Sandoval

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZcxcK31o7OmGAq77@rosa.proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=m.sandoval@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal