|
Require is assumed to be operating on trusted code so there's no need for safeguards.Actually, we are compelled to use require() for trusted code only (because of security hole).
It is not typical for user-supplied files to be loaded that way.
you may as well just set up a proper sandboxing framework andUnfortunately, sandboxing is necessary.
load untrusted files manually instead of with require.
But I don't know why you'd really want to do that.