ACLs are now checked before sending a will message.
This commit is contained in:
parent
991f1173d7
commit
21b372ed9e
@ -6,6 +6,7 @@ Broker:
|
||||
#464437.
|
||||
- Fix incorrect bridge connection notifications on local broker.
|
||||
- Fix persistent db writing on Windows. Closes #464779.
|
||||
- ACLs are now checked before sending a will message.
|
||||
|
||||
Client library:
|
||||
- Inflight message count wasn't being decreased for outgoing messages using
|
||||
|
@ -188,8 +188,10 @@ void mqtt3_context_cleanup(struct mosquitto_db *db, struct mosquitto *context, b
|
||||
void mqtt3_context_disconnect(struct mosquitto_db *db, struct mosquitto *ctxt)
|
||||
{
|
||||
if(ctxt->state != mosq_cs_disconnecting && ctxt->will){
|
||||
/* Unexpected disconnect, queue the client will. */
|
||||
mqtt3_db_messages_easy_queue(db, ctxt, ctxt->will->topic, ctxt->will->qos, ctxt->will->payloadlen, ctxt->will->payload, ctxt->will->retain);
|
||||
if(mosquitto_acl_check(db, ctxt, ctxt->will->topic, MOSQ_ACL_WRITE) == MOSQ_ERR_SUCCESS){
|
||||
/* Unexpected disconnect, queue the client will. */
|
||||
mqtt3_db_messages_easy_queue(db, ctxt, ctxt->will->topic, ctxt->will->qos, ctxt->will->payloadlen, ctxt->will->payload, ctxt->will->retain);
|
||||
}
|
||||
}
|
||||
if(ctxt->will){
|
||||
if(ctxt->will->topic) _mosquitto_free(ctxt->will->topic);
|
||||
|
Loading…
Reference in New Issue
Block a user