Skip to content

Commit 68567b0

Browse files
committed
Release 7.0.6 - See CHANGELOG.md
1 parent b15348c commit 68567b0

File tree

2 files changed

+36
-30
lines changed

2 files changed

+36
-30
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 7.0.6 2022-07-09 <dave at tiredofit dot ca>
2+
3+
### Changed
4+
- Escape document_root for FastCGI default scripts
5+
6+
17
## 7.0.5 2022-07-06 <dave at tiredofit dot ca>
28

39
### Changed

install/assets/functions/20-php-fpm

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -251,37 +251,37 @@ EOF
251251
phpfpm_configure_site_default() {
252252
if [ -z "${NGINX_SITE_ENABLED}" ] && [ ! -f "/etc/nginx/sites.available/default.conf" ] && [ -f "/etc/cont-init.d/20-php-fpm" ]; then
253253
cat <<EOF > /etc/nginx/sites.available/default.conf
254-
server {
255-
### Don't Touch This
256-
listen ${NGINX_LISTEN_PORT};
257-
root ${NGINX_WEBROOT};
258-
259-
### Populate your custom directives here
260-
index index.php index.html index.htm;
261-
262-
location / {
263-
try_files \$uri \$uri/ /index.php?\$args;
264-
}
265-
266-
### Populate your custom directives here
267-
location ~ \.php(/|\$) {
268-
include /etc/nginx/snippets/php-fpm.conf;
269-
fastcgi_split_path_info ^(.+?\.php)(/.+)\$;
270-
fastcgi_param PATH_INFO \$fastcgi_path_info;
271-
fastcgi_index index.php;
272-
include fastcgi_params;
273-
fastcgi_param SCRIPT_FILENAME $document_root\$fastcgi_script_name;
254+
server {
255+
### Don't Touch This
256+
listen ${NGINX_LISTEN_PORT};
257+
root ${NGINX_WEBROOT};
258+
259+
### Populate your custom directives here
260+
index index.php index.html index.htm;
261+
262+
location / {
263+
try_files \$uri \$uri/ /index.php?\$args;
264+
}
265+
266+
### Populate your custom directives here
267+
location ~ \.php(/|\$) {
268+
include /etc/nginx/snippets/php-fpm.conf;
269+
fastcgi_split_path_info ^(.+?\.php)(/.+)\$;
270+
fastcgi_param PATH_INFO \$fastcgi_path_info;
271+
fastcgi_index index.php;
272+
include fastcgi_params;
273+
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
274+
}
275+
276+
# Deny access to any files with a .php extension in the uploads directory
277+
location ~* /(?:uploads|files)/.*\.php$ {
278+
deny all;
279+
}
280+
281+
### Don't edit past here
282+
include /etc/nginx/snippets/site_optimization.conf;
283+
include /etc/nginx/snippets/exploit_protection.conf;
274284
}
275-
276-
# Deny access to any files with a .php extension in the uploads directory
277-
location ~* /(?:uploads|files)/.*\.php$ {
278-
deny all;
279-
}
280-
281-
### Don't edit past here
282-
include /etc/nginx/snippets/site_optimization.conf;
283-
include /etc/nginx/snippets/exploit_protection.conf;
284-
}
285285
EOF
286286
NGINX_SITE_ENABLED=default
287287
nginx_site_enable default

0 commit comments

Comments
 (0)