Skip to content

Commit

Permalink
Fix clients being disconnected when ACLs are in use.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ralight committed Feb 14, 2019
1 parent 6b43ba8 commit 5e81993
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions ChangeLog.txt
@@ -1,3 +1,12 @@
1.5.8 - 2019xxxx
================

Broker:
- Fix clients being disconnected when ACLs are in use. 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.


1.5.7 - 20190213
================

Expand Down
3 changes: 0 additions & 3 deletions src/security_default.c
Expand Up @@ -642,9 +642,6 @@ int acl__find_acls(struct mosquitto_db *db, struct mosquitto *context)
}
acl_tail = acl_tail->next;
}
if(context->username && context->acl_list == NULL){
return MOSQ_ERR_INVAL;
}
}else{
context->acl_list = NULL;
}
Expand Down
1 change: 1 addition & 0 deletions test/broker/Makefile
Expand Up @@ -121,6 +121,7 @@ endif
endif

09 :
./09-acl-access-variants.py
./09-acl-empty-file.py
./09-plugin-auth-unpwd-success.py
./09-plugin-auth-unpwd-fail.py
Expand Down
1 change: 1 addition & 0 deletions test/broker/ptest.py
Expand Up @@ -93,6 +93,7 @@
(2, './08-tls-psk-pub.py'),
(3, './08-tls-psk-bridge.py'),

(1, './09-acl-access-variants.py'),
(1, './09-acl-empty-file.py'),
(1, './09-plugin-auth-unpwd-success.py'),
(1, './09-plugin-auth-unpwd-fail.py'),
Expand Down

0 comments on commit 5e81993

Please sign in to comment.