-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
json.unmarshal unmarshals an invalid json in some cases #2331
Comments
Looks like the problem might be with how the decoding is happening. Under the hood we are using |
Note: Since this commit breaks some tests unexpectedly as a side effect, I workaround by changing called method and left a FIXME comment on it. Fixes: open-policy-agent#2331 Signed-off-by: katsew <y.katsew@gmail.com>
Fixes: open-policy-agent#2331 Signed-off-by: katsew <y.katsew@gmail.com>
Fixes: #2331 Signed-off-by: katsew <y.katsew@gmail.com>
Hi, I wrote some tests in conftest, which is implemented on top of opa.
I hit an unexpected result in some cases with
json.unmarshal
.Here is an example to reproduce the issue.
https://play.openpolicyagent.org/p/XS3RGihDpm
Expected Behavior
It should be panicked when invalid json is passed into
json.unmarshal
.Actual Behavior
json.unmarshal
succeeded.Steps to Reproduce the Problem
The text was updated successfully, but these errors were encountered: