]> granicus.if.org Git - php/commitdiff
Add tilde to allowed status/ping path
authorDrakano <drakano@arcor.de>
Thu, 12 Sep 2019 08:18:30 +0000 (10:18 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 17 Sep 2019 10:19:21 +0000 (12:19 +0200)
Because of user specific webdirs it should be possible to set a
status/ping path like "/~username/status".

Closes GH-4698.

sapi/fpm/fpm/fpm_conf.c

index 42ee60b36cce58d13d1b14003888328cd3f43d4d..88959eebc669c2d8e6bc76251d92cb94ab9c0cc3 100644 (file)
@@ -873,8 +873,8 @@ static int fpm_conf_process_all_pools() /* {{{ */
                        }
 
                        for (i = 0; i < strlen(status); i++) {
-                               if (!isalnum(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);
+                               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;
                                }
                        }
@@ -896,8 +896,8 @@ static int fpm_conf_process_all_pools() /* {{{ */
                        }
 
                        for (i = 0; i < strlen(ping); i++) {
-                               if (!isalnum(ping[i]) && ping[i] != '/' && ping[i] != '-' && ping[i] != '_' && ping[i] != '.') {
-                                       zlog(ZLOG_ERROR, "[pool %s] the ping path '%s' must containt only the following characters '[alphanum]/_-.'", wp->config->name, ping);
+                               if (!isalnum(ping[i]) && ping[i] != '/' && ping[i] != '-' && ping[i] != '_' && ping[i] != '.' && ping[i] != '~') {
+                                       zlog(ZLOG_ERROR, "[pool %s] the ping path '%s' must containt only the following characters '[alphanum]/_-.~'", wp->config->name, ping);
                                        return -1;
                                }
                        }