public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Markus Frank <m.frank@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH access-control 1/1] fix #3748 changed regex-pattern to accept escape sequences on Comma
Date: Wed, 19 Jan 2022 13:21:41 +0100 (CET)	[thread overview]
Message-ID: <678344591.1922.1642594901255@webmail.proxmox.com> (raw)

Correction: Patch for access-control and not for container

> On 19.01.2022 13:04 markus frank <m.frank@proxmox.com> wrote:
> 
>  
> old-pattern: '\w+=[^,]+(,\s*\w+=[^,]+)*'
> the old pattern didn't allow LDAP base domain name to be like: dc=first\, second, dc=com
> new-pattern: qr(\w+=([^,\\]|\\,)+(,\s*\w+=([^,\\]|\\,)+)*),
> 
> ---
>  src/PVE/Auth/LDAP.pm | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/PVE/Auth/LDAP.pm b/src/PVE/Auth/LDAP.pm
> index 97d0778..ad23cb2 100755
> --- a/src/PVE/Auth/LDAP.pm
> +++ b/src/PVE/Auth/LDAP.pm
> @@ -19,7 +19,7 @@ sub properties {
>  	base_dn => {
>  	    description => "LDAP base domain name",
>  	    type => 'string',
> -	    pattern => '\w+=[^,]+(,\s*\w+=[^,]+)*',
> +	    pattern => qr(\w+=([^,\\]|\\,)+(,\s*\w+=([^,\\]|\\,)+)*),
>  	    optional => 1,
>  	    maxLength => 256,
>  	},
> @@ -33,7 +33,7 @@ sub properties {
>  	bind_dn => {
>  	    description => "LDAP bind domain name",
>  	    type => 'string',
> -	    pattern => '\w+=[^,]+(,\s*\w+=[^,]+)*',
> +	    pattern => qr(\w+=([^,\\]|\\,)+(,\s*\w+=([^,\\]|\\,)+)*),
>  	    optional => 1,
>  	    maxLength => 256,
>  	},
> @@ -91,7 +91,7 @@ sub properties {
>  	    description => "LDAP base domain name for group sync. If not set, the"
>  		." base_dn will be used.",
>  	    type => 'string',
> -	    pattern => '\w+=[^,]+(,\s*\w+=[^,]+)*',
> +	    pattern => qr(\w+=([^,\\]|\\,)+(,\s*\w+=([^,\\]|\\,)+)*),
>  	    optional => 1,
>  	    maxLength => 256,
>  	},
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




                 reply	other threads:[~2022-01-19 12:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=678344591.1922.1642594901255@webmail.proxmox.com \
    --to=m.frank@proxmox.com \
    --cc=pve-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