From d8fa7f26afad830ae0507a3ca683a3e5ba9bc273 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 17 Sep 2023 19:39:40 -0700 Subject: [PATCH] Use proper function to compare versions https://github.com/virtualmin/virtualmin-gpl/issues/641 --- webmin/update.cgi | 2 +- webmin/webmin-lib.pl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/webmin/update.cgi b/webmin/update.cgi index 21b7bf184..d51afcd81 100755 --- a/webmin/update.cgi +++ b/webmin/update.cgi @@ -35,7 +35,7 @@ foreach $url (@urls) { my $nver = $u->[1]; $nver =~ s/^(\d+\.\d+)\..*$/$1/; next if (%info && $info{'version'} && - $info{'version'} >= $nver); + &compare_version_numbers($info{'version'}, $nver) >= 0); if ($in{'show'}) { # Just tell the user what would be done diff --git a/webmin/webmin-lib.pl b/webmin/webmin-lib.pl index d1bf49394..7b7d9bdd0 100755 --- a/webmin/webmin-lib.pl +++ b/webmin/webmin-lib.pl @@ -2458,7 +2458,8 @@ foreach my $u (@$allupdates) { next if (!%info && !$missing); # Skip if module has a version, and we already have it - next if (%info && $info{'version'} && $info{'version'} >= $nver); + next if (%info && $info{'version'} && + &compare_version_numbers($info{'version'}, $nver) >= 0); # Skip if not supported on this OS my $osinfo = { 'os_support' => $u->[3] };