From 797bebb1a1cce22b119dccbe863e1a1db7c1270a Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Mon, 31 Aug 2020 20:29:07 -0500 Subject: [PATCH] Fix ENCKEY_PATH check in configtest.py --- configtest.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/configtest.py b/configtest.py index a70c3c9..57945a7 100644 --- a/configtest.py +++ b/configtest.py @@ -56,7 +56,7 @@ if "ALLOWED_EXTENSIONS" in checksettings: for e in settings.ALLOWED_EXTENSIONS: if not e.startswith("."): invalid_exts.append(e) - + if len(invalid_exts) > 0: print("[!] The following extensions listed in ALLOWED_EXTENSIONS are invalid:") for e in invalid_exts: @@ -96,14 +96,9 @@ if "ROOTURL" in checksettings: print("[" + u"\u2713" + "] ROOTURL is good!") -# Ask the user if SAVELOG is the intended filename -if "SAVELOG" in checksettings: - print("[*] SAVELOG was interpreted to be {0}".format(settings.SAVELOG)) - print("[*] If this is not the intended filename, please fix it.") - # Check if ENCKEY_PATH exists enckey_exists = True -if "UPLOAD_FOLDER" in checksettings: +if "ENCKEY_PATH" in checksettings: if not os.path.isfile(settings.ENCKEY_PATH): enckey_exists = False print("[!] The path set in ENCKEY_PATH ('{0}') doesn't exist!".format(settings.ENCKEY_PATH)) @@ -111,6 +106,12 @@ if "UPLOAD_FOLDER" in checksettings: print("[" + u"\u2713" + "] ENCKEY_PATH exists!") +# Ask the user if SAVELOG is the intended filename +if "SAVELOG" in checksettings: + print("[*] SAVELOG was interpreted to be {0}".format(settings.SAVELOG)) + print("[*] If this is not the intended filename, please fix it.") + + # Show summary print() print("----- SUMMARY -----") @@ -137,6 +138,10 @@ if not uploadfolder_exists: summarygood = False print("UPLOAD_FOLDER ({0}) does not exist!".format(settings.UPLOAD_FOLDER)) +if not enckey_exists: + summarygood = False + print("ENCKEY_PATH ({0}) does not exist!".format(settings.ENCKEY_PATH)) + if not rooturl_good: summarygood = False print("ROOTURL may cause issues!")