Skip to content

Commit

Permalink
Fix possible crash having just upgraded from 1.6.
Browse files Browse the repository at this point in the history
Happens if `per_listener_settings true` is set, and a SIGHUP is sent to
the broker before a client has reconnected to the broker.

Closes #2167. Thanks to momoskitto.
  • Loading branch information
ralight committed Apr 8, 2021
1 parent ec54bce commit c418b57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.txt
@@ -1,6 +1,11 @@
2.0.11 - 2021-xx-xx
===================

Broker:
- Fix possible crash having just upgraded from 1.6 if `per_listener_settings
true` is set, and a SIGHUP is sent to the broker before a client has
reconnected to the broker. Closes #2167.

Clients:
- If sending mosquitto_sub output to a pipe, mosquitto_sub will now detect
that the pipe has closed and disconnect. Closes #2164.
Expand Down
3 changes: 3 additions & 0 deletions src/security.c
Expand Up @@ -764,6 +764,9 @@ int mosquitto_unpwd_check(struct mosquitto *context)
rc = MOSQ_ERR_PLUGIN_DEFER;

if(db.config->per_listener_settings){
if(context->listener == NULL){
return MOSQ_ERR_AUTH;
}
opts = &context->listener->security_options;
}else{
opts = &db.config->security_options;
Expand Down

0 comments on commit c418b57

Please sign in to comment.