From a5c4a867d9a0d21a865670014ba497120e895d74 Mon Sep 17 00:00:00 2001 From: Paul Taylor <21125224+bao7uo@users.noreply.github.com> Date: Mon, 4 Jul 2022 21:40:58 +0100 Subject: [PATCH 1/2] Update DomainGPPPassword.cs This changes means that C# v7 is no longer a minimum requirement --- SharpUp/Checks/DomainGPPPassword.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SharpUp/Checks/DomainGPPPassword.cs b/SharpUp/Checks/DomainGPPPassword.cs index ab1b94a..d3a2bc8 100644 --- a/SharpUp/Checks/DomainGPPPassword.cs +++ b/SharpUp/Checks/DomainGPPPassword.cs @@ -31,7 +31,8 @@ public DomainGPPPassword() file.Contains("Printers.xml") || file.Contains("Drives.xml")) { - if (ParseGPPPasswordFromXml(file, out GPPPassword result)) + GPPPassword result; + if (ParseGPPPasswordFromXml(file, out result)) { _isVulnerable = true; _details.Add(result.ToString()); From 36b67c164a631e6d6d3b1c689f465963c2dade3f Mon Sep 17 00:00:00 2001 From: Paul Taylor <21125224+bao7uo@users.noreply.github.com> Date: Mon, 4 Jul 2022 21:44:43 +0100 Subject: [PATCH 2/2] Update CachedGPPPassword.cs Add explicity variable declaration for the out variable. This changes means that C# v7 is no longer a minimum requirement --- SharpUp/Checks/CachedGPPPassword.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SharpUp/Checks/CachedGPPPassword.cs b/SharpUp/Checks/CachedGPPPassword.cs index 958c905..dd7b18c 100644 --- a/SharpUp/Checks/CachedGPPPassword.cs +++ b/SharpUp/Checks/CachedGPPPassword.cs @@ -37,7 +37,8 @@ public CachedGPPPassword() { continue; // uninteresting XML files, move to next } - if (ParseGPPPasswordFromXml(file, out GPPPassword result)) + GPPPassword result; + if (ParseGPPPasswordFromXml(file, out result)) { _isVulnerable = true; _details.Add(result.ToString());