mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-06-18 16:41:32 +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
|
|
@ -51,5 +51,9 @@
|
|||
# Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics
|
||||
header ?Permissions-Policy "browsing-topics=()"
|
||||
|
||||
# Prevent PHP execution in the media upload directory
|
||||
@php_in_media path_regexp (?i)^/media/.*\.(php[3-8]?|phar|phtml|pht|phps)$
|
||||
respond @php_in_media 403
|
||||
|
||||
php_server
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue