tfa: cope with native versions in cluster version check

Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit 4a7b5956ec)
This commit is contained in:
Thomas Lamprecht 2023-06-09 16:06:43 +02:00 committed by Fabian Grünbichler
parent 97a3696297
commit 3f1331f0c5

View File

@ -1942,7 +1942,7 @@ sub assert_new_tfa_config_available() {
}
$info = from_json($info);
my $ver = $info->{version};
if ($ver !~ /^(\d+\.\d+)-(\d+)/) {
if ($ver !~ /^(\d+\.\d+)(?:[.-](\d+))?/) {
$old .= " cluster node '$node' provided an invalid version string: '$ver'\n";
next;
}