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

[bug] || replaced with comma in policy fields #430

Closed
tpsb opened this issue Oct 7, 2024 · 2 comments · Fixed by #431
Closed

[bug] || replaced with comma in policy fields #430

tpsb opened this issue Oct 7, 2024 · 2 comments · Fixed by #431
Assignees

Comments

@tpsb
Copy link

tpsb commented Oct 7, 2024

The project I'm working on stores groovy code in one of the policy fields and some of the policies happen to use || operator.
Recent versions of jcasbin after loading policies end up with the operator replaced with a comma - this modification breaks the function we have in place which expects to evaluate the value of the field a groovy code and reports Script.groovy: 1: Unexpected input: ',' @ line 1...

The bug was introduced by PR #408 which was an attempt to fix issue #407. The real cause of issue #407, however, was in casbin/jdbc-adapter which didn't escape policy field values read in from the database before parsing the data as a CSV line - this was fixed by PR #74 which ended up in publicly available release of jdbc-adapter version 2.10.0.

Issue #407 does not require changes introduced by PR #408 and as those changes bring in a separate bug (at least in some cases), I'd like to ask for PR #408 be reverted and a new version be released.

@casbin-bot
Copy link
Member

@tangyang9464 @imp2002

Copy link

github-actions bot commented Oct 7, 2024

🎉 This issue has been resolved in version 1.68.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants