Ignore multiple spaces when parsing acl files.

pull/211/merge
Roger A. Light 11 years ago
parent c6450ac265
commit ccc8a81187

@ -369,6 +369,10 @@ static int _aclfile_parse(struct mosquitto_db *db)
token = strtok_r(NULL, "", &saveptr);
if(token){
topic = token;
/* Ignore duplicate spaces */
while(topic[0] == ' '){
topic++;
}
}else{
topic = access_s;
access_s = NULL;
@ -401,6 +405,10 @@ static int _aclfile_parse(struct mosquitto_db *db)
}else if(!strcmp(token, "user")){
token = strtok_r(NULL, "", &saveptr);
if(token){
/* Ignore duplicate spaces */
while(token[0] == ' '){
token++;
}
if(user) _mosquitto_free(user);
user = _mosquitto_strdup(token);
if(!user){

Loading…
Cancel
Save