|
|
|
@ -703,13 +703,13 @@ int mosquitto_security_apply_default(struct mosquitto_db *db)
|
|
|
|
|
/* Check for anonymous clients when allow_anonymous is false */
|
|
|
|
|
if(!allow_anonymous && !context->username){
|
|
|
|
|
context->state = mosq_cs_disconnecting;
|
|
|
|
|
_mosquitto_socket_close(db, context);
|
|
|
|
|
do_disconnect(db, context);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
/* Check for connected clients that are no longer authorised */
|
|
|
|
|
if(mosquitto_unpwd_check_default(db, context->username, context->password) != MOSQ_ERR_SUCCESS){
|
|
|
|
|
context->state = mosq_cs_disconnecting;
|
|
|
|
|
_mosquitto_socket_close(db, context);
|
|
|
|
|
do_disconnect(db, context);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
/* Check for ACLs and apply to user. */
|
|
|
|
|