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

__evaluate_entry and __evaluate_exit can be overridden inside expression #695

Open
adamscybot opened this issue May 9, 2024 · 0 comments · May be fixed by #700
Open

__evaluate_entry and __evaluate_exit can be overridden inside expression #695

adamscybot opened this issue May 9, 2024 · 0 comments · May be fixed by #700
Labels

Comments

@adamscybot
Copy link

These "secret" environment callbacks are regularly used to timebox expressions or detect loops. You can disable such protections by assigning them to a falsey value inside the expression itself.

These bindings should probably be non-writeable (possibly non-readable also?) from inside the expression:

const expression = jsonata(`
 (
    $__evaluate_entry := false;
    $__evaluate_exit := false;
    /* Anything here, like a loop, will not be captured by the entry and exit callbacks */
  )
`)

await expression.evaluate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants