[pve-devel] [PATCH installer 1/2] common: pinning: require first character to be lower-case ascii
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Nov 25 07:54:52 CET 2025
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.
More information about the pve-devel
mailing list