ACL patterns that do not contain either %c or %u are now rejected.

Closes #209.

Bug: https://github.com/eclipse/mosquitto/issues/209

Signed-off-by: Roger A. Light <roger@atchoo.org>
pull/891/head
Roger A. Light 7 years ago
parent 7f0b4d6271
commit 39170d1181

@ -16,6 +16,8 @@ Broker:
Closes #851.
- Fix problem opening listeners on Pi caused by unsigned char being default.
Found via #849.
- ACL patterns that do not contain either %c or %u are now rejected. Closes
#209.
Library:
- Fix some places where return codes were incorrect, including to the

@ -279,6 +279,14 @@ int add__acl_pattern(struct mosquitto__security_options *security_opts, const ch
}
}
if(acl->ccount == 0 && acl->ucount == 0){
log__printf(NULL, MOSQ_LOG_ERR,
"Error: ACL pattern '%s' does not contain '%%c' or '%%u'.",
topic);
return MOSQ_ERR_INVAL;
}
if(security_opts->acl_patterns){
acl_tail = security_opts->acl_patterns;
while(acl_tail->next){

Loading…
Cancel
Save