all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH installer 1/2] common: pinning: require first character to be lower-case ascii
Date: Wed, 26 Nov 2025 19:15:55 +0100	[thread overview]
Message-ID: <20251126191555.3e944519@rosa.proxmox.com> (raw)
In-Reply-To: <5482904f-efa5-40ef-b8e6-f1ba935f2431@proxmox.com>

On Tue, 25 Nov 2025 07:54:52 +0100
Thomas Lamprecht <t.lamprecht@proxmox.com> wrote:

> Am 18.11.25 um 16:15 schrieb Stoiko Ivanov:
> > the validation regex in pve-common is:
> > `/^[a-z][a-z0-9_]{1,20}([:\.]\d+)?$/` [0]  
> 
> Recently re-checked this patch, as when adding some tests for this, the
> behavior of allowing uppercase characters for all but the first one 
> seemed strange given above regex.
> 
> But this isn't the real regex though, as that would require all lowercase,
> not just the first character. The real regex as linked by [0] has a
> case-insensitive flag applied, so the case limitations of your patch suggest
> are overly strict compared to what pve-common accepts.
> It can be fine to be a bit more restrictive here, but lets not justificate
> doing so with a wrongly quoted validation regex.
> 
Thanks for catching this! as my previous attempts at getting this in sync
with what pve-common does always missed something (and/or followed my
gut-feeling more than what the code in pve-common actually does) - I
copied the validation from pve-common:
https://lore.proxmox.com/pve-devel/20251126180819.817240-1-s.ivanov@proxmox.com/T/#t



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2025-11-26 18:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18 15:15 [pve-devel] [PATCH installer 0/2] nic pinning: require first character to be lower-case Stoiko Ivanov
2025-11-18 15:15 ` [pve-devel] [PATCH installer 1/2] common: pinning: require first character to be lower-case ascii Stoiko Ivanov
2025-11-25  6:54   ` Thomas Lamprecht
2025-11-26 18:15     ` Stoiko Ivanov [this message]
2025-11-18 15:15 ` [pve-devel] [PATCH installer 2/2] sys: net: fix error-message for interface names first character Stoiko Ivanov
2025-11-18 16:31 ` [pve-devel] applied: [PATCH installer 0/2] nic pinning: require first character to be lower-case Thomas Lamprecht

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=20251126191555.3e944519@rosa.proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal