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

Decision log plugin trimming query prefix incorrectly #783

Closed
tsandall opened this issue Jun 13, 2018 · 0 comments · Fixed by #784
Closed

Decision log plugin trimming query prefix incorrectly #783

tsandall opened this issue Jun 13, 2018 · 0 comments · Fixed by #784
Labels

Comments

@tsandall
Copy link
Member

The decision logger is trimming the query prefix using strings.TrimLeft which expects a set of characters to remove. As a result, it's stripping all leading characters in "data." instead of just the string prefix "data.".

@tsandall tsandall added the bug label Jun 13, 2018
tsandall added a commit to tsandall/opa that referenced this issue Jun 13, 2018
The decision logger was using strings.TrimLeft when it should have been
using strings.TrimPrefix. As a result, the prefix was not being trimmed
correctly--leading characters in the cutset "data." were being removed.

Fixes open-policy-agent#783

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
tsandall added a commit that referenced this issue Jun 13, 2018
The decision logger was using strings.TrimLeft when it should have been
using strings.TrimPrefix. As a result, the prefix was not being trimmed
correctly--leading characters in the cutset "data." were being removed.

Fixes #783

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant