]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
modules/version: only report CVE if versions differ
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 20 Oct 2016 16:39:07 +0000 (18:39 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 20 Oct 2016 16:45:14 +0000 (18:45 +0200)
Also avoid that extremely long line.

modules/version/version.lua.in

index e41836b29d2d04876c1c41a87c32af588d17e418..461d1932911b448f02bd0fba7ef2baae3db6d28e 100644 (file)
@@ -51,10 +51,13 @@ local function parse(record)
     local version = parseVersion(str)
     local localVersion = '@VERSION@'
     if version ~= localVersion then
-        output = output .. string.format("[version] Current version of Knot DNS Resolver is different from the latest stable one available. (Current: %s, Latest stable: %s)\n", localVersion, version)
-    end
-    if CVE ~= "N/A" then
-        output = output .. string.format("[version] CVE: %s\n", CVE)
+        output = output .. string.format(
+                       "[version] Current version of Knot DNS Resolver is different from the latest stable one available."
+                               .. " (Current: %s, Latest stable: %s)\n",
+                       localVersion, version)
+               if CVE ~= "N/A" then
+                       output = output .. string.format("[version] CVE: %s\n", CVE)
+               end
     end
     io.write(output)
 end