GithubHelp home page GithubHelp logo

protected-eval's Introduction

Form.io Protected Eval Plugin

This plugin makes formiojs library to use sandboxed eval with custom js-interpreter instead of default eval function.

Usage

import ProtectedEval from '@formio/protected-eval';
import { Formio } from 'formiojs';

Formio.use(ProtectedEval);

Differences with classic eval

Plugin doesn't allow usage of following variables in custom scripts:

  • instance
  • self

There is also a performance regression when this library is used. If you have more than 100 calculated values within your form, you will see a noticable performance decrease in the runtime performance of the form.

protected-eval's People

Contributors

mikekotikov avatar parasgera avatar roflankisel avatar travist avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

parasgera

protected-eval's Issues

Upgrade to [email protected]

js-interpreter has recently been updated with some performance enhancements, upgarding to 3.0.1 would probably increase the speed of form.io significantly, therefore it's worth upgrading.

Opening a PR is simple enough, but I wasn't sure how to test the library, if you want me to, I can open a PR with the required changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.