Update Backup / Restore, now streams backup and restore to disk instead of memory causing memory to run out, sets timeout limit to unlimited, checks backup file contents for anything bad, use php instead shell exec for import of db, added .htaccess for apache to prevent php execution in /uploads/ directory as this is intended for file download only

This commit is contained in:
johnnyq
2025-10-09 12:28:38 -04:00
parent fbf3346052
commit ed589ef65b
4 changed files with 780 additions and 210 deletions

11
uploads/.htaccess Normal file
View File

@@ -0,0 +1,11 @@
php_flag engine off
RemoveHandler .php .phtml .php3 .php4 .php5 .php7 .php8
RemoveType application/x-httpd-php
<FilesMatch "\.(php|phtml|php[0-9])$">
Deny from all
</FilesMatch>
Options -ExecCGI
AddHandler cgi-script .cgi .pl .sh .bash .zsh
<FilesMatch "\.(cgi|pl|sh|bash|zsh)$">
Deny from all
</FilesMatch>