mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-06-08 19:51:36 +00:00
Block access to all php and phar files that are uploaded into the media folder
This commit is contained in:
parent
c2ec0ee12b
commit
6e5d1c967f
5 changed files with 29 additions and 1 deletions
|
|
@ -52,6 +52,11 @@ server {
|
|||
location ~ \.php$ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Prevent PHP execution in the media upload directory
|
||||
location ~* ^/media/.*\.(php[3-8]?|phar|phtml|pht|phps)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
# Set Content-Security-Policy for svg files, to block embedded javascript in there
|
||||
location ~* \.svg$ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue