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

eval not enabled as an option for jsonpath, can't filter JSON on WebsiteAgent #175

Closed
snicker opened this issue Mar 7, 2014 · 5 comments

Comments

@snicker
Copy link
Contributor

snicker commented Mar 7, 2014

Wanted to use filters in the selectors of JSON so I don't generate 100+ events everytime I pull down the Bitpay API, but using a filter like the following:

 [?(@.code == "USD")].rate

raises the following exception:

Exception during check: Cannot use ?(...) unless eval is enabled -- ["/usr/local/rvm/gems/ruby-1.9.3-p484@huginn/gems/jsonpath-0.5.3/lib/jsonpath/enumerable.rb:32:in `block in each'", "/usr/local/r...
@cantino
Copy link
Member

cantino commented Mar 7, 2014

Interesting. I turned it off because I was worried about eval being a
security hole if you have a multi-user Huginn setup. Maybe we should
change it to be an .env option?

On Thursday, March 6, 2014, snicker notifications@github.com wrote:

Wanted to use filters in the selectors of JSON so I don't generate 100+
events everytime I pull down the Bitpay API, but using a filter like the
following:

[?(@.code == "USD")].rate

raises the following exception:

Exception during check: Cannot use ?(...) unless eval is enabled -- ["/usr/local/rvm/gems/ruby-1.9.3-p484@huginn/gems/jsonpath-0.5.3/lib/jsonpath/enumerable.rb:32:in `block in each'", "/usr/local/r...

Reply to this email directly or view it on GitHubhttps://github.com//issues/175
.

@snicker
Copy link
Contributor Author

snicker commented Mar 7, 2014

.env option would rock, I'm using it at home, I can trust my users (me)

@cantino
Copy link
Member

cantino commented Mar 7, 2014

If you want to add it to the .env config with an environment variable, I
think it'd be pretty straightforward. Let me know if you have any
questions!

On Thursday, March 6, 2014, snicker notifications@github.com wrote:

.env option would rock, I'm using it at home, I can trust my users (me)

Reply to this email directly or view it on GitHubhttps://github.com//issues/175#issuecomment-36968638
.

@snicker
Copy link
Contributor Author

snicker commented Mar 7, 2014

PR here: #177

@dsander
Copy link
Collaborator

dsander commented May 13, 2014

Resolved by #229 and #177

@dsander dsander closed this as completed May 13, 2014
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

No branches or pull requests

3 participants