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]Lack of type judgment on the input string, resulting in authentication failure #950
Comments
@tangyang9464 @closetool @sagilio |
It works just fine as I run the same code you give up there. 😦 |
You can run the above code repeatedly, and you will find that after inserting the
or
|
@zj611 still nothing |
You may solve this by updating to latest release version of casbin |
After initial communication with the author, I found that the problem was caused by casbin version. The current latest version
update: reference repo: https://github.com/zj611/casbin_demo.git |
We found in testing that an input of unusual string type would cause the Enforce function to fail completely, as shown in the code block below. When calling the
enforcer.Enforce
function, an error of invalid policy size will be thrown, resulting in a failure to judge the permission.//exception error: false invalid policy size: expected 3, got 1, pvals: [role::35046358490550272]
model.conf
The text was updated successfully, but these errors were encountered: