If you enter a URL in browser pointing to a PHP file and .php at the end is not all lowercase (e.g. .phP, .pHp, .PHP, like example.com/index.PHP), Apache shows content of the PHP file.
This is because of this config in /etc/apache2/conf-enabled/docker-php.conf:
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
To fix it, FilesMatch's regexp should be case-insensitive:
<FilesMatch \.(?i:php)$>
SetHandler application/x-httpd-php
</FilesMatch>
I can make a pull request but should the change be made in this file?
|
echo '<FilesMatch \.php$>'; \ |
If you enter a URL in browser pointing to a PHP file and
.phpat the end is not all lowercase (e.g..phP,.pHp,.PHP, likeexample.com/index.PHP), Apache shows content of the PHP file.This is because of this config in
/etc/apache2/conf-enabled/docker-php.conf:To fix it,
FilesMatch's regexp should be case-insensitive:I can make a pull request but should the change be made in this file?
php/apache-Dockerfile-block-1
Line 45 in a80762e