There's no way to fix this "issue" other than by disabling reflection, which would break all mods.
Mods not being able to call System.exit() from outside a world is a bug, why not fix that instead?
I believe this is not an issue on Forge's side but rather a security flaw on OpenJDK's side, I wanted to post a bug report about this to OpenJDK but it seems they've raised the bar quite high regarding who can post in the bug tracker...
"security flaw".... So tell me your reasoning. You see the words "Reflection" and "Shutdown", and think "this must be dangerous omg"?
OpenJDK would laugh at an issue just as much as anyone with more than a basic understanding of Java will when they see this bug report. Being able to bypass the security manager is an expected consequence of allowing the use of reflection.
If the bar is high for making OpenJDK issues, it's probably because of people like you making bug reports because of their ignorance of Java.
@Runemoro please do not resort to ad hominem, I've been respectful towards you in all exchanges we had till now, and I've been patient, but patience is a limited resource you're running out of.
Reflection is one big security hole. Using it to bypass security is nothing
new.
>
@War-Wizard That's because my patience has already run out:
I suggest you learn more about Java and open source licenses before claiming that someone's mod is "dangerous" or "unethical".
@War-Wizard The intention of the FML security manager is to not stop mods from forcing an exit or to offer any "security", it is to mitigate poor use of System.exit, likely from a developer not knowing the implications, causing silent exits. VanillaFix is very intentionally offering special behavior in your example. If a mod wants to exit officially it can use FMLCommonHandler#exitJava, however in the context of a loading plugin as your example contains, that would be fairy questionable as that class really shouldn't be accessed that early.
Most helpful comment
@War-Wizard That's because my patience has already run out:
I suggest you learn more about Java and open source licenses before claiming that someone's mod is "dangerous" or "unethical".