Skip to content

Make sure IMPORT_BLACKLIST works on every class lookup - #30

Merged
Jamextreme140 merged 1 commit into
CodenameCrew:codename-devfrom
Villezen:blocklist-everywhere
Nov 17, 2026
Merged

Jamextreme140 merged 1 commit into
CodenameCrew:codename-devfrom
Villezen:blocklist-everywhere

Conversation

@Villezen

Copy link
Copy Markdown

So until now IMPORT_BLACKLIST was only checked on import lines, which made blocked classes still work by just writing their name or full path.

EXAMPLE:

public static final IMPORT_BLACKLIST:Array<String> = ["Sys", "sys"];

Every line in this script now throws its error properly where before only the import did:

import sys.io.File; // Invalid class

Sys.command("echo hi"); // Unknown variable
sys.io.File.saveContent("test.txt", "hi"); // Unknown variable
new sys.io.Process("cmd", []); // Unknown variable

Before this change, the last three lines ran fine even though sys was blacklisted!!!

@Jamextreme140 Jamextreme140 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely forgot about the full class path reference. Thanks for the change :3

@Jamextreme140
Jamextreme140 merged commit f23b2af into CodenameCrew:codename-dev Nov 17, 2026
1 check passed
@Villezen
Villezen deleted the blocklist-everywhere branch November 17, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants