From 40085c30e2946795b5390c31b0d6a53e6aa1dc0b Mon Sep 17 00:00:00 2001 From: Your Name <40523890+Brain-dawg@users.noreply.github.com> Date: Sun, 9 Feb 2025 09:32:21 -0500 Subject: [PATCH] add secret bypassing --- mge/functions.nut | 1 - mge/vpi/vpi.py | 2 +- mge/vpi/vpi_config.py | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mge/functions.nut b/mge/functions.nut index 5ea2b08..d16f07e 100644 --- a/mge/functions.nut +++ b/mge/functions.nut @@ -2552,7 +2552,6 @@ function allmeat() { return } - "4player" : function() { return } diff --git a/mge/vpi/vpi.py b/mge/vpi/vpi.py index 635cd60..9c788c3 100644 --- a/mge/vpi/vpi.py +++ b/mge/vpi/vpi.py @@ -253,7 +253,7 @@ def ExtractCallsFromFile(path): data = json.loads(contents) ident = Decrypt(**data["Identity"]) - if (ident != vpi_config.SECRET): + if (ident != vpi_config.SECRET and not vpi_config.BYPASS_SECRET): LOGGER.warning("Invalid identification in file: %s; ignoring", path) return diff --git a/mge/vpi/vpi_config.py b/mge/vpi/vpi_config.py index f05f081..a8a8665 100644 --- a/mge/vpi/vpi_config.py +++ b/mge/vpi/vpi_config.py @@ -28,6 +28,7 @@ # This should be the same token returned in the GetSecret function in vpi.nut # It's used to identify files created by VPI SECRET = r"" +BYPASS_SECRET = False #do not set this to true unless you know what you're doing if (not SECRET): raise RuntimeError("Please set your secret token")