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