- Added columns for two-factor authentication (2FA) in the pp_users table: - twofa_enabled (TINYINT) - twofa_email (VARCHAR) - twofa_code_hash (VARCHAR) - twofa_expires_at (DATETIME) - twofa_sent_at (DATETIME) - twofa_failed_attempts (INT) - Updated the twofa_enabled and twofa_email for user with id 0. - Enhanced .htaccess to disable directory listing, block execution of sensitive files, and prevent serving hidden files.
20 lines
523 B
ApacheConf
20 lines
523 B
ApacheConf
# Wyłącz listowanie
|
|
Options -Indexes
|
|
|
|
# Domyślnie blokujemy wszystko…
|
|
Require all denied
|
|
|
|
# …a dopiero potem pozwalamy na pliki statyczne
|
|
<FilesMatch "\.(css|js|map|mjs|png|jpe?g|gif|svgz?|webp|ico|woff2?|woff|ttf|eot)$">
|
|
Require all granted
|
|
</FilesMatch>
|
|
|
|
# Twardo blokuj cokolwiek, co mogłoby się wykonać
|
|
<FilesMatch "\.(php|phtml|php[0-9]?|phar|pht|cgi|pl|py|sh)$">
|
|
Require all denied
|
|
</FilesMatch>
|
|
|
|
# Nie serwuj plików ukrytych (.env itp.)
|
|
<FilesMatch "^\.(.*)$">
|
|
Require all denied
|
|
</FilesMatch> |