Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment with a block or a node system to replace the older "safe_eval" system #36

Open
Faraphel opened this issue Jan 17, 2024 · 1 comment
Assignees

Comments

@Faraphel
Copy link
Owner

The project need to allow the mods creators to write their own logic describing how to patch a file. The current system use a subset of Python (named "safe_eval" in the project) that try to avoid as much dangerous instructions as possible, but might be flawed due to its nature.
To avoid this issue, this system will be replaced either by a block system (similar to Scratch or Blocky), or a node system (similar to the one available in Blender), that would be way more beginner-friendly and would avoid many security risk for the users.

@Faraphel Faraphel self-assigned this Jan 17, 2024
@Faraphel
Copy link
Owner Author

After some experimentation with a node system, it seem a bit incompatible with the idea of the project : some structure would be hard to represent like loop and condition, calling another function and some other control blocks that are essential to the project.

Another possibility would be to use the Lua programming language that can be sand-boxed to avoid issues, but is a bit too high level and require many additional functions to make it easy to use.

The best option would be to use the v8 Engine from google that allow running javascript in a sandbox (this is the engine used in chromium). It is heavily maintained and would allow for a tool like Blocky to make it more accessible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant