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

getSafeProperty fails when object is an instance of a class. #2909

Closed
krishnanelloore-gep opened this issue Mar 6, 2023 · 1 comment
Closed
Labels

Comments

@krishnanelloore-gep
Copy link

image
In the getSafeProperty function, the first step is to make sure the object is a plain object by calling isPlainObject, and in this function the code is object.constructor===Object. Here is where our code breaks.

@josdejong
Copy link
Owner

The scope of mathjs expressions does only support plain objects or Map, but not classes. These restrictions are in place to limit security risks.

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

No branches or pull requests

2 participants