-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Updated JsonPathV2 version to latest. #1674
Conversation
Awesome! Is it save now that you are using instance_eval or could a user still "break out" of the binding? |
It is a lot safer than a plain Eval with no binding what was before this! A plain Eval with no binding has the current context, which is Everything! Instance_eval has only current instance context which is basically JsonPath at that point or the @_current_node instance variable which has limited access to things. It's very close to a simple block being passed around. But I wouldn't say it's airtight now, yet. :-) |
class A; end
A.new.instance_eval "eval('`pwd`')"
# => "/Users/andrewcantino/workspace/...\n" |
Yes, like I said it's not airtight. Also I was referring to Ruby's scope. So instance_eval doesn't have the same scope as a plain no binding Eval. |
Yea, I think it's fine as long as it's still off by default in Huginn. :) What else has changed between 0.0.3 and 0.0.7? |
Functionally nothing. :) I'm trying to make the code a bit easier to read and understand. Which isn't too easy. :D I'm going to write a list of changes in a bit. |
So, the changes:
EDIT: And ofc, eval is still disabled by default. You have to explicitly enable it if you want to use it. :) But eval is still able to execute arbitrary code. And eventually, I want to completely remove the use of eval. But it's proving to be very difficult. :) |
@Skarlso should we merge this, or do you want to update it to fix that |
I'm going to fix it today. :) Wait until than please. :) Thanks. |
@cantino Fixed and pushed a new version. Thanks! |
Thanks @Skarlso! |
Eyy, thanks @cantino! I'm trying to debug stuff right now. And I'm writing a ton of new tests. Hopefully I'll flush something out. :-) |
No description provided.