Check ACL patterns for validity when loading.
Closes #1539. Thanks to Leon Poon.
This commit is contained in:
parent
c8789180f3
commit
b6119bb759
@ -1,5 +1,6 @@
|
|||||||
Broker:
|
Broker:
|
||||||
- Fix session expiry with very large expiry intervals. Closes #1525.
|
- Fix session expiry with very large expiry intervals. Closes #1525.
|
||||||
|
- Check ACL patterns for validity when loading. Closes #1539.
|
||||||
|
|
||||||
1.6.8 - 20191128
|
1.6.8 - 20191128
|
||||||
================
|
================
|
||||||
|
@ -510,6 +510,14 @@ static int aclfile__parse(struct mosquitto_db *db, struct mosquitto__security_op
|
|||||||
}else{
|
}else{
|
||||||
access = MOSQ_ACL_READ | MOSQ_ACL_WRITE;
|
access = MOSQ_ACL_READ | MOSQ_ACL_WRITE;
|
||||||
}
|
}
|
||||||
|
rc = mosquitto_sub_topic_check(topic);
|
||||||
|
if(rc != MOSQ_ERR_SUCCESS){
|
||||||
|
log__printf(NULL, MOSQ_LOG_ERR, "Error: Invalid ACL topic \"%s\" in acl_file \"%s\".", topic, security_opts->acl_file);
|
||||||
|
mosquitto__free(user);
|
||||||
|
fclose(aclfptr);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
if(topic_pattern == 0){
|
if(topic_pattern == 0){
|
||||||
rc = add__acl(security_opts, user, topic, access);
|
rc = add__acl(security_opts, user, topic, access);
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
Reference in New Issue
Block a user