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

User can't connect if acl_file contains no username block #1162

Closed
quonb opened this issue Feb 14, 2019 · 1 comment
Closed

User can't connect if acl_file contains no username block #1162

quonb opened this issue Feb 14, 2019 · 1 comment

Comments

@quonb
Copy link

quonb commented Feb 14, 2019

If acl_file contains only pattern rules or there is no definition for user then acl__find_acls function returns MOSQ_ERR_INVAL.

if(context->username && context->acl_list == NULL){
return MOSQ_ERR_INVAL;
}

This causes immediate disconnect despite correct username/password pair
rc = acl__find_acls(db, context);
if(rc) return rc;

This regression were caused by c40957a

ralight added a commit that referenced this issue Feb 14, 2019
This only affects the case where a client connects using a username, and
the anonymous ACL list is defined but specific user ACLs are not
defined.

Closes #1162. Thanks to quonb.
@ralight
Copy link
Contributor

ralight commented Feb 14, 2019

Thanks for finding this. For information, the description isn't quite right, it only happens if the anonymous ACL list is defined but there are no specific user ACLs. I've pushed a fix to the fixes branch.

@ralight ralight closed this as completed Feb 14, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants