aboutsummaryrefslogtreecommitdiffstats
path: root/0007-SupportHelper-Disable-running-arbitrary-code-snippet.patch
diff options
context:
space:
mode:
author1024x22024-07-20 15:21:28 +0100
committer1024x22024-07-20 15:21:28 +0100
commit81fbe676d788841cc8580815e2e2067759961fbe (patch)
tree0f56d36d7b24b0ae77e112408a2a16d6ae7c20b9 /0007-SupportHelper-Disable-running-arbitrary-code-snippet.patch
parentd1697c3c30b8633ea2754d257db189fce268f898 (diff)
Update patches
Diffstat (limited to '0007-SupportHelper-Disable-running-arbitrary-code-snippet.patch')
-rw-r--r--0007-SupportHelper-Disable-running-arbitrary-code-snippet.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/0007-SupportHelper-Disable-running-arbitrary-code-snippet.patch b/0007-SupportHelper-Disable-running-arbitrary-code-snippet.patch
new file mode 100644
index 0000000..e2d28a7
--- /dev/null
+++ b/0007-SupportHelper-Disable-running-arbitrary-code-snippet.patch
@@ -0,0 +1,46 @@
+From 5dc5bfcf6b8cc2f12be7cbfcc770a759217c6d11 Mon Sep 17 00:00:00 2001
+From: 1024x2 <2pow11@gmail.com>
+Date: Sat, 20 Jul 2024 00:21:22 +0100
+Subject: [PATCH 7/8] SupportHelper: Disable running arbitrary code snippets
+
+Why is this even a thing?
+---
+ src/plugins/_core/supportHelper.tsx | 22 ----------------------
+ 1 file changed, 22 deletions(-)
+
+diff --git a/src/plugins/_core/supportHelper.tsx b/src/plugins/_core/supportHelper.tsx
+index de8e37c7..7cb0044d 100644
+--- a/src/plugins/_core/supportHelper.tsx
++++ b/src/plugins/_core/supportHelper.tsx
+@@ -300,28 +300,6 @@ export default definePlugin({
+ </Button>
+ );
+ }
+-
+- if (props.message.author.id === VENBOT_USER_ID) {
+- const match = CodeBlockRe.exec(props.message.content || props.message.embeds[0]?.rawDescription || "");
+- if (match) {
+- buttons.push(
+- <Button
+- key="vc-run-snippet"
+- onClick={async () => {
+- try {
+- await AsyncFunction(match[1])();
+- showToast("Success!", Toasts.Type.SUCCESS);
+- } catch (e) {
+- new Logger(this.name).error("Error while running snippet:", e);
+- showToast("Failed to run snippet :(", Toasts.Type.FAILURE);
+- }
+- }}
+- >
+- Run Snippet
+- </Button>
+- );
+- }
+- }
+ }
+
+ return buttons.length
+--
+2.45.2
+