Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Enhance command parser #31

Open
pgross41 opened this issue Jun 30, 2020 · 2 comments
Open

Enhance command parser #31

pgross41 opened this issue Jun 30, 2020 · 2 comments

Comments

@pgross41
Copy link
Contributor

pgross41 commented Jun 30, 2020

The console uses parseCommand to support reading and assigning variables but functionality is very limited as it is not a true command parser. Opting not to use Function because executing unchecked user input poses security concerns.

This is a solution that uses Function with an allowlist strategy so that only supported members on window can be executed: https://stackoverflow.com/a/46374395

This is ideal as it would allow debugging with Intl which has been a common cause of issues in embedded IE.

@pgross41
Copy link
Contributor Author

The stackoverflow option above is useless. This or something like it seems better: https://github.com/asvd/jailed
Demo site: http://asvd.github.io/jailed/demos/web/console/

@pgross41
Copy link
Contributor Author

Or run in a sandboxed iframe https://stackoverflow.com/a/26488003

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant