hetzner: Quote interpolated value in regex

to prevent metacharacter issues.
This commit is contained in:
Richard Hansen 2024-07-02 02:08:27 -04:00
parent 0b79e3bc95
commit ab2e0d7999

View file

@ -5896,7 +5896,7 @@ sub nic_hetzner_update {
my $headers = "Auth-API-Token: $config{$domain}{'password'}\n";
$headers .= "Content-Type: application/json";
(my $hostname = $domain) =~ s/\.$config{$domain}{zone}$//;
(my $hostname = $domain) =~ s/\Q.$config{$domain}{zone}\E$//;
my $ipv4 = delete $config{$domain}{'wantipv4'};
my $ipv6 = delete $config{$domain}{'wantipv6'};