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 prevented in JSONPath expression #343

Closed
eugargen opened this issue Apr 11, 2023 · 22 comments
Closed

Eval prevented in JSONPath expression #343

eugargen opened this issue Apr 11, 2023 · 22 comments

Comments

@eugargen
Copy link

eugargen commented Apr 11, 2023

I get this error when I add any condition in expression
With error

But if I use * to get every element I got some result
No error

Is there any idea what's wrong?
In docs https://grafana.github.io/grafana-json-datasource/jsonpath#filters there is example using expression but in practice it is not available

@disambiguationuk
Copy link

I'm getting this too with 1.3.5, 1.3.3 still works

@disambiguationuk
Copy link

Actually why is it 1.3.5 in the marketplace? 1.3.3 is tagged against the latest commit to master...

@eugargen
Copy link
Author

Yep, I guess the error appears on versions 1.3.5 and 1.3.4 only. Versions 1.3.3 and below works fine.
Thanks!

I'm getting this too with 1.3.5, 1.3.3 still works

@disambiguationuk
Copy link

It's probably worth keeping the issue open to flag that there's a bug somewhere though

@eugargen eugargen reopened this Apr 13, 2023
@anthonypruiz
Copy link

Yeah, bug here... Glad it's been flagged.

@DipalPrajapati
Copy link

So by when it can be solved? any alternative to it?

@pacallan
Copy link

If 1.3.3 is the latest official release, why are the later versions being pushed to users on Grafana Cloud?

@df-cgdm
Copy link

df-cgdm commented Apr 20, 2023

Is there any way to force loading the previous version ?

@Wepstern
Copy link

Is there any way to force loading the previous version ?

Here you can find help for ...

@disambiguationuk
Copy link

Is there any way to force loading the previous version ?

Yeah you can declare it like marcusolsson-json-datasource 1.3.3 under GF_INSTALL_PLUGINS

@wolfgang-azevedo
Copy link

Having the same issue here, cannot use filters anymore.

@pacallan
Copy link

Is there any way to force loading the previous version ?

Yeah you can declare it like marcusolsson-json-datasource 1.3.3 under GF_INSTALL_PLUGINS

The various solutions suggested so far assume that Grafana is installed locally. For those using Grafana Cloud, options are more limited. How can we revert to an earlier plugin version in Grafana Cloud?

@benhorstmann
Copy link

benhorstmann commented May 3, 2023

Same here. Have the same question as @pacallan , how does one downgrade the plugin?

@kristoferlandgren
Copy link

I have a Grafana cloud instance and I have been in contact with the cloud provider. They say downgrading of plugins are not supported which is very unfortunate. Right now I have no way forward except for this issue to be fixed.

@pacallan
Copy link

pacallan commented Jun 5, 2023

https://github.com/grafana/grafana-json-datasource/blob/main/CHANGELOG.md

It appears the "bug" may have been a deliberate change to prevent exploitation of a vulnerability. The changelog includes suggestions for workarounds for those who rely on eval expressions.

@Dexter-14
Copy link

Is there any way to force loading the previous version ?

Yeah you can declare it like marcusolsson-json-datasource 1.3.3 under GF_INSTALL_PLUGINS

Can you tell where is GF_INSTALL_PLUGINS`

@0xbbeer
Copy link

0xbbeer commented Jun 30, 2023

Same Issue with v1.3.6

@sibebleuze
Copy link

This is in the changelog as an expected error starting from v1.3.5. However @yesoreyeram this indeed also happens in v1.3.4. Is it possible this should be in the changelog at 1 version earlier?

@petr-kus
Copy link

petr-kus commented Nov 7, 2023

1.3.8 - the same issue. This is a high prio bug and high severity. It almost blocked usage at all. When there are empty fields in JSON it doesn't have a workaround to display when you want to display more fields (expressions were a workaround). The workaround to don't update to the latest version isn't a workaround... it blocks the usage of new releases. Documentation in many places isn't valid because of this bug.

@zoltanbedi
Copy link
Member

Because of security consideration we are not going to support filters in jsonpath anymore. Please read the changelog why. https://github.com/grafana/grafana-json-datasource/blob/main/CHANGELOG.md#v135---2023-04-05

@rwader-swi
Copy link

why only when twas my time ;_;

@hasokeric
Copy link

Allow the ability to mark datasource as Trusted.

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