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

Fixes #115 #118

Merged
merged 5 commits into from
Feb 1, 2019
Merged

Fixes #115 #118

merged 5 commits into from
Feb 1, 2019

Conversation

filips123
Copy link
Collaborator

It fixes #115.

The problem in #115 is that variable $config is already initialized in the parameter of parseString() as a string. The configuration file will then try to re-initialize it and fail it because eval() executions can see and modify variables from the real file.

This PR adds a separate "isolated" method which only executes string with eval(). It must use some weird parameter name because we must ensure that is wont be in the config file. I think that $EGsfKPdue7ahnMTy (some random string) would be enough.

@hassankhan hassankhan merged commit 5c0ad8e into hassankhan:develop Feb 1, 2019
@hassankhan
Copy link
Owner

Thanks for your PR, @filips123!

@hassankhan
Copy link
Owner

@filips123 I've also added you as a collaborator on the repository, so you won't have to rely on myself or @DavidePastore. We don't get enough time to give this library the love that it deserves, and I feel you've been really helpful in keeping this project alive. Thanks again for all your hard work 👍

@filips123
Copy link
Collaborator Author

@hassankhan Thank you!

@DavidePastore DavidePastore added this to the 2.0.1 milestone Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parse中eval(code) 有bug
3 participants