Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions sapi/fpm/fpm/fpm_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,8 @@ static int fpm_conf_process_all_pools(void)
return -1;
}

for (i = 0; i < strlen(status); i++) {
size_t status_len = strlen(status);
for (i = 0; i < status_len; i++) {
if (!isalnum(status[i]) && status[i] != '/' && status[i] != '-' && status[i] != '_' && status[i] != '.' && status[i] != '~') {
zlog(ZLOG_ERROR, "[pool %s] the status path '%s' must contain only the following characters '[alphanum]/_-.~'", wp->config->name, status);
return -1;
Expand All @@ -991,12 +992,13 @@ static int fpm_conf_process_all_pools(void)
return -1;
}

if (strlen(ping) < 2) {
size_t ping_len = strlen(ping);
if (ping_len < 2) {
zlog(ZLOG_ERROR, "[pool %s] the ping path '%s' is not long enough", wp->config->name, ping);
return -1;
}

for (i = 0; i < strlen(ping); i++) {
for (i = 0; i < ping_len; i++) {
if (!isalnum(ping[i]) && ping[i] != '/' && ping[i] != '-' && ping[i] != '_' && ping[i] != '.' && ping[i] != '~') {
zlog(ZLOG_ERROR, "[pool %s] the ping path '%s' must contain only the following characters '[alphanum]/_-.~'", wp->config->name, ping);
return -1;
Expand Down
Loading