-
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
Octal numbers #6377
Comments
Hi Jure! 👋 Any value in Rego must be valid JSON — octal numbers aren't, so they can't be Rego values. |
Hi! Thanks for answer, but I would be ok if it would result in parse error (response code 400), but it succeeds in upload (response code 20?). But then querying policies crashes with response code 500. |
Oh, gotcha! Yeah, that does indeed seem like a bug. |
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue. |
Short description
OPA still have problems with octal numbers (leading zeros). I know that it was set as resolved in here, #2947 but problem is still there.
Steps To Reproduce
Minimal posible example that reproduces the thing - I need octals as a file mode (0644, 0755, ..).
curl -X PUT http://127.0.0.1:8181/v1/policies/octal.rego --data-binary "@octal.rego" curl -X GET http://127.0.0.1:8181/v1/policies/octal.rego
Result:
Even worse is that it fails with same error if one calls.
So if one does not remember what id was used in broken one, it is impossible to get a list to delete broken one, and you get stuck and can not list all items and fix one with problem.
Expected behavior
For my case best case would be to support octal numbers. But also acceptable would be to fail on PUT, or just convert number to decumal.
Additional context
Thanks, Jure
The text was updated successfully, but these errors were encountered: