1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-17 12:23:36 +00:00

Blacklist more sensitive modules.

This commit is contained in:
EliteMasterEric 2024-05-02 02:49:55 -04:00
parent 244db84d61
commit 656e5e7cf1

View file

@ -213,9 +213,23 @@ class PolymodHandler
// Add blacklisting for prohibited classes and packages.
// `Sys`
// Sys.command() can run malicious processes
Polymod.blacklistImport('Sys');
// `Reflect`
// Reflect.callMethod() can access blacklisted packages
Polymod.blacklistImport('Reflect');
// `Type`
// Type.createInstance(Type.resolveClass()) can access blacklisted packages
Polymod.blacklistImport('Type');
// `cpp.Lib`
// Lib.load() can load malicious DLLs
Polymod.blacklistImport('cpp.Lib');
// `polymod.*`
// You can probably unblacklist a module
for (cls in ClassMacro.listClassesInPackage('polymod'))
{
if (cls == null) continue;