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

fix: fixed the ArrayIndexOutOfBoundsException #314

Merged
merged 5 commits into from
Nov 13, 2022

Conversation

OutOfEastGate
Copy link
Contributor

Fix #311

@casbin-bot
Copy link
Member

@tangyang9464 @imp2002 please review

@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2022

Codecov Report

Merging #314 (fb933a3) into master (783030c) will decrease coverage by 0.09%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #314      +/-   ##
==========================================
- Coverage   69.41%   69.31%   -0.10%     
==========================================
  Files          48       48              
  Lines        2197     2200       +3     
  Branches      407      408       +1     
==========================================
  Hits         1525     1525              
- Misses        556      558       +2     
- Partials      116      117       +1     
Impacted Files Coverage Δ
...ain/java/org/casbin/jcasbin/main/CoreEnforcer.java 77.19% <0.00%> (-0.83%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@TraMiu
Copy link

TraMiu commented Nov 13, 2022

@OutOfEastGate
Hi, I have used the MySQL adapter and I generated the policy with null value by INSERT INTO casbin_rule directly will null value.
Later, when I changed the value from null to true, it worked.
I want to help review this PR, but don't know how to add changes to my local Enforcer.java because it is in View Mode.
Can you show me how can I help you?

@OutOfEastGate
Copy link
Contributor Author

@OutOfEastGate Hi, I have used the MySQL adapter and I generated the policy with null value by INSERT INTO casbin_rule directly will null value. Later, when I changed the value from null to true, it worked. I want to help review this PR, but don't know how to add changes to my local Enforcer.java because it is in View Mode. Can you show me how can I help you?

Thank you. I have added the code to check for policy, which will no longer throw an array out of bounds, but will give an exception to prompt the invalid policy. You can check if there are any other questions.

@hsluoyz hsluoyz merged commit 1da0a44 into casbin:master Nov 13, 2022
@github-actions
Copy link

🎉 This PR is included in version 1.31.2 🎉

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ArrayIndexOutOfBoundsException when combining ABAC and RBAC
5 participants