From cadfa3b7ceae2ecabe2d544ddc4c9f453b0dfd56 Mon Sep 17 00:00:00 2001 From: Hyper_ <40342021+NotHyper-474@users.noreply.github.com> Date: Sun, 1 Jun 2025 16:48:46 -0300 Subject: [PATCH] Polymod: Blacklist `funkin.util.macro.*` It has `CompiledClassList` which allows access to `sys` and Newgrounds API functions. --- source/funkin/modding/PolymodHandler.hx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/funkin/modding/PolymodHandler.hx b/source/funkin/modding/PolymodHandler.hx index 3bb103afa..b41967c89 100644 --- a/source/funkin/modding/PolymodHandler.hx +++ b/source/funkin/modding/PolymodHandler.hx @@ -398,6 +398,16 @@ class PolymodHandler var className:String = Type.getClassName(cls); Polymod.blacklistImport(className); } + + // `funkin.util.macro.*` + // CompiledClassList's get function allows access to sys and Newgrounds classes + // None of the classes are suitable for mods anyway + for (cls in ClassMacro.listClassesInPackage('funkin.util.macro')) + { + if (cls == null) continue; + var className:String = Type.getClassName(cls); + Polymod.blacklistImport(className); + } } /**