]> git.proxmox.com Git - pve-manager.git/commitdiff
fix error message
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 26 Mar 2012 06:24:15 +0000 (08:24 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 26 Mar 2012 06:24:15 +0000 (08:24 +0200)
Only test MD5 if status is active

PVE/API2/Subscription.pm

index 7097a5cdcbb3f0b256eef91bbf0cb7200134adfb..f31c771d615deb35dac436fcd0574ccabee5d25a 100644 (file)
@@ -223,8 +223,10 @@ sub check_subscription {
     $subinfo->{key} = $key;
 
     my $emd5sum = md5_hex($shared_key_data . $check_token);
-    if (!$subinfo->{md5hash} || ($subinfo->{md5hash} ne $emd5sum)) {
-       die "MD5 Checksum Verification Failed";
+    if ($subinfo->{status} && $subinfo->{status} eq 'Active') {
+       if (!$subinfo->{md5hash} || ($subinfo->{md5hash} ne $emd5sum)) {
+           die "MD5 Checksum Verification Failed\n";
+       }
     }
     
     check_fields($subinfo, $server_id, $req_sockets);