[pve-devel] [PATCH installer 5/5] fix #5230: sys: net: properly escape FQDN regex

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Feb 23 17:27:52 CET 2024


Am 15/02/2024 um 13:39 schrieb Christoph Heiss:
> Due to interpolation, the \. sequence must be double-escaped.
> Previously, this would result in a non-escaped dot, thus matching much
> more liberally than it should.
> 

OK, but...


> diff --git a/proxmox-installer-common/src/utils.rs b/proxmox-installer-common/src/utils.rs
> index 0ed7438..03efdd7 100644
> --- a/proxmox-installer-common/src/utils.rs
> +++ b/proxmox-installer-common/src/utils.rs
> @@ -309,6 +309,12 @@ mod tests {
>              Fqdn::from(&format!("{}.com", "a".repeat(64))),
>              Err(InvalidPart("a".repeat(64))),
>          );
> +
> +        // https://bugzilla.proxmox.com/show_bug.cgi?id=3497

...why link on a feature request for terraform support then?


> diff --git a/test/parse-fqdn.pl b/test/parse-fqdn.pl
> index 3009984..df8739d 100755
> --- a/test/parse-fqdn.pl
> +++ b/test/parse-fqdn.pl
> @@ -51,4 +51,7 @@ is_parsed('a' x 63 . '.com', ['a' x 63, 'com']);
>  is_invalid('a' x 250 . '.com', ERR_TOOLONG);
>  is_invalid('a' x 64 . '.com', ERR_ALPHANUM);
>  
> +# https://bugzilla.proxmox.com/show_bug.cgi?id=3497

same here




More information about the pve-devel mailing list