Skip to content

Commit 252ebce

Browse files
Drakanonikic
authored andcommitted
Add tilde to allowed status/ping path
Because of user specific webdirs it should be possible to set a status/ping path like "/~username/status". Closes GH-4698.
1 parent 29bced9 commit 252ebce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sapi/fpm/fpm/fpm_conf.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,8 @@ static int fpm_conf_process_all_pools() /* {{{ */
873873
}
874874

875875
for (i = 0; i < strlen(status); i++) {
876-
if (!isalnum(status[i]) && status[i] != '/' && status[i] != '-' && status[i] != '_' && status[i] != '.') {
877-
zlog(ZLOG_ERROR, "[pool %s] the status path '%s' must contain only the following characters '[alphanum]/_-.'", wp->config->name, status);
876+
if (!isalnum(status[i]) && status[i] != '/' && status[i] != '-' && status[i] != '_' && status[i] != '.' && status[i] != '~') {
877+
zlog(ZLOG_ERROR, "[pool %s] the status path '%s' must contain only the following characters '[alphanum]/_-.~'", wp->config->name, status);
878878
return -1;
879879
}
880880
}
@@ -896,8 +896,8 @@ static int fpm_conf_process_all_pools() /* {{{ */
896896
}
897897

898898
for (i = 0; i < strlen(ping); i++) {
899-
if (!isalnum(ping[i]) && ping[i] != '/' && ping[i] != '-' && ping[i] != '_' && ping[i] != '.') {
900-
zlog(ZLOG_ERROR, "[pool %s] the ping path '%s' must containt only the following characters '[alphanum]/_-.'", wp->config->name, ping);
899+
if (!isalnum(ping[i]) && ping[i] != '/' && ping[i] != '-' && ping[i] != '_' && ping[i] != '.' && ping[i] != '~') {
900+
zlog(ZLOG_ERROR, "[pool %s] the ping path '%s' must containt only the following characters '[alphanum]/_-.~'", wp->config->name, ping);
901901
return -1;
902902
}
903903
}

0 commit comments

Comments
 (0)