Fix merge error.
This commit is contained in:
parent
0bb602ed7a
commit
bb61cd2dee
@ -956,7 +956,7 @@ int config__read_file_core(struct mosquitto__config *config, bool reload, const
|
||||
/* Check for existing bridge name. */
|
||||
for(i=0; i<config->bridge_count; i++){
|
||||
if(!strcmp(config->bridges[i].name, token)){
|
||||
_mosquitto_log_printf(NULL, MOSQ_LOG_ERR, "Error: Duplicate bridge name \"%s\".", token);
|
||||
log__printf(NULL, MOSQ_LOG_ERR, "Error: Duplicate bridge name \"%s\".", token);
|
||||
return MOSQ_ERR_INVAL;
|
||||
}
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ int mosquitto_acl_check(struct mosquitto_db *db, struct mosquitto *context, cons
|
||||
int rc;
|
||||
int i;
|
||||
struct mosquitto_acl_msg msg;
|
||||
char *username;
|
||||
const char *username;
|
||||
|
||||
if(!context->id){
|
||||
return MOSQ_ERR_ACL_DENIED;
|
||||
@ -371,7 +371,7 @@ int mosquitto_acl_check(struct mosquitto_db *db, struct mosquitto *context, cons
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
msg.topic = topic;
|
||||
|
||||
username = mosquito_client_username(context);
|
||||
username = mosquitto_client_username(context);
|
||||
/* Check whether the client id or username contains a +, # or / and if
|
||||
* so deny access.
|
||||
*
|
||||
@ -379,11 +379,11 @@ int mosquitto_acl_check(struct mosquitto_db *db, struct mosquitto *context, cons
|
||||
* plugins against possible pattern based attacks.
|
||||
*/
|
||||
if(username && strpbrk(username, "+#/")){
|
||||
_mosquitto_log_printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous username \"%s\"", username);
|
||||
log__printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous username \"%s\"", username);
|
||||
return MOSQ_ERR_ACL_DENIED;
|
||||
}
|
||||
if(context->id && strpbrk(context->id, "+#/")){
|
||||
_mosquitto_log_printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous client id \"%s\"", context->id);
|
||||
log__printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous client id \"%s\"", context->id);
|
||||
return MOSQ_ERR_ACL_DENIED;
|
||||
}
|
||||
|
||||
|
@ -273,12 +273,12 @@ int mosquitto_acl_check_default(struct mosquitto_db *db, struct mosquitto *conte
|
||||
* publish or receive messages to its own place in the hierarchy).
|
||||
*/
|
||||
if(context->username && strpbrk(context->username, "+#/")){
|
||||
_mosquitto_log_printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous username \"%s\"", context->username);
|
||||
log__printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous username \"%s\"", context->username);
|
||||
return MOSQ_ERR_ACL_DENIED;
|
||||
}
|
||||
|
||||
if(context->id && strpbrk(context->id, "+#/")){
|
||||
_mosquitto_log_printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous client id \"%s\"", context->id);
|
||||
log__printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous client id \"%s\"", context->id);
|
||||
return MOSQ_ERR_ACL_DENIED;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user