-
Notifications
You must be signed in to change notification settings - Fork 392
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
possible error formatting error message in security module [JIRA: RIAK-1802] #706
Comments
proposed fix: note, it doesn't replace Bucket being any in case the parameter is {Type, Bucket}, I haven't seen that case, but adding a case for that is easy
|
riak_core_security_tests: security_test_ (Issue 706, error formatted correctly for unauthorized and bucket any)...*failed* in function unicode:characters_to_binary/3 called as characters_to_binary(any,utf8,utf8) in call from riak_core_security:check_permission/2 (src/riak_core_security.erl, line 380) in call from riak_core_security_tests:'-security_test_/0-fun-141-'/1 (test/riak_core_security_tests.erl, line 251) in call from riak_core_security_tests:'-security_test_/0-fun-142-'/0 (test/riak_core_security_tests.erl, line 251) **error:badarg
here is a failing test case and a proposed fix: https://github.com/marianoguerra/riak_core/tree/fix-issue-706 comparison here: https://github.com/marianoguerra/riak_core/compare/fix-issue-706 I can do a pull request if it fits your workflow |
comment for jira |
@marianoguerra - Did you run into this during normal Riak usage or only from a |
Please see this pull request: _[posted via JIRA by Luke Bakken]_ |
[~jmeredith], can you get someone to review this and get added to the next Riak release? The "Get Preflist" function will not work with Riak security enabled without this fix. Thanks. _[posted via JIRA by Derek Somogyi]_ |
This issue is currently holding up the PHP 2.1 release. It appears as though the change/fix will be included in the 2.1.2 release. I added that tag to the Labels field. _[posted via JIRA by Derek Somogyi]_ |
Merged into 2.1 on July 7. _[posted via JIRA by Douglas Rohrer]_ |
hi, I think this is an error, if I get a confirmation I would be more than happy to provide a pull request.
the issue starts when a call like this:
bucket2iolist seems to be only called from the line 380 here:
https://github.com/basho/riak_core/blob/develop/src/riak_core_security.erl#L380
and it fails because instead of translating the atom any to something like "*" or "any" it calls unicode:characters_to_binary(Bucket, utf8, utf8) which fails.
should the fix be matching any and returning a string representation of it?
The text was updated successfully, but these errors were encountered: