Skip to content

Avoid loading external plugins from the working directory by default#565

Open
AzusaSaku wants to merge 1 commit into
SamboyCoding:developmentfrom
AzusaSaku:plugin-loading-options
Open

Avoid loading external plugins from the working directory by default#565
AzusaSaku wants to merge 1 commit into
SamboyCoding:developmentfrom
AzusaSaku:plugin-loading-options

Conversation

@AzusaSaku

Copy link
Copy Markdown

This changes external plugin discovery to be application-relative by default instead of depending on the process working directory.

Previously, the default Plugins directory was resolved from Environment.CurrentDirectory. This could be surprising when Cpp2IL is launched from a game directory or another untrusted working directory, since external plugin DLL discovery would then depend on that location. Since external plugins are loaded as .NET assemblies, this avoids accidentally treating the working directory as a plugin trust source.

This PR also adds:

  • --plugins-dir to load external plugins from an explicit directory
  • --no-plugins to skip external plugin loading while still initializing built-in plugins

Absolute plugin paths continue to work, and relative plugin paths are resolved from the Cpp2IL application directory.

Resolve relative plugin directories from the application base path and add CLI options for explicit plugin loading control.
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.

1 participant