Fix bug #77 - Error in ACL command parsing.
This commit is contained in:
parent
aeba7188c0
commit
1e380ecf0f
@ -185,18 +185,10 @@ static int acl_parse_line(char* line, int line_count, void* ptr_data)
|
|||||||
pos[0] = 0;
|
pos[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
line = strip_white_space(line);
|
||||||
if (!*line)
|
if (!*line)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
LOG_DEBUG("acl_parse_line(): '%s'", line);
|
|
||||||
line = strip_white_space(line);
|
|
||||||
|
|
||||||
if (!*line)
|
|
||||||
{
|
|
||||||
LOG_FATAL("ACL parse error on line %d", line_count);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG_DEBUG("acl_parse_line: '%s'", line);
|
LOG_DEBUG("acl_parse_line: '%s'", line);
|
||||||
|
|
||||||
ACL_ADD_USER("bot", handle->users, cred_bot);
|
ACL_ADD_USER("bot", handle->users, cred_bot);
|
||||||
|
@ -46,10 +46,13 @@ char* strip_white_space(char* string)
|
|||||||
{
|
{
|
||||||
char* pos;
|
char* pos;
|
||||||
|
|
||||||
|
if (!string)
|
||||||
|
return "";
|
||||||
|
|
||||||
while (string[0] && is_white_space(string[0])) string++;
|
while (string[0] && is_white_space(string[0])) string++;
|
||||||
|
|
||||||
if (!*string)
|
if (!*string)
|
||||||
return 0;
|
return string;
|
||||||
|
|
||||||
/* Strip appending whitespace */
|
/* Strip appending whitespace */
|
||||||
pos = &string[strlen(string)-1];
|
pos = &string[strlen(string)-1];
|
||||||
|
Loading…
Reference in New Issue
Block a user