Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-2682) Update Apache Configuration to use FilesMatch instead … #1277

Merged

Conversation

DavidS
Copy link
Contributor

@DavidS DavidS commented Nov 26, 2015

…of AddHandler for PHP Files.

The issue with this is that the extension handling behaviour of apache is
not well known by most php developers, and many php scripts are open to
security issues if this configuration is used (most commonly these scripts
handle upload forms which white list image extensions). For example
foo.php.jpg will be handled by php.

Many distro's no longer use AddHandler in their default config:
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/php5/vivid/view/head:/debian/php5.conf.

The PHP manual also recommends avoiding it:
http://php.net/manual/en/install.unix.apache2.php#example-20

This is based on Alejandro Bednarik's alejandro.bednarik@gmail.com original
fix, I added proper regex escaping, and a changelog entry. All bugs are mine.

…of AddHandler for PHP Files.

The issue with this is that the extension handling behaviour of apache is
not well known by most php developers, and many php scripts are open to
security issues if this configuration is used (most commonly these scripts
handle upload forms which white list image extensions). For example
foo.php.jpg will be handled by php.

Many distro's no longer use AddHandler in their default config:
  http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/vivid/php5/vivid/view/head:/debian/php5.conf.

The PHP manual also recommends avoiding it:
  http://php.net/manual/en/install.unix.apache2.php#example-20

This is based on Alejandro Bednarik's <alejandro.bednarik@gmail.com> original
fix, I added proper regex escaping, and a changelog entry. All bugs are mine.
@abednarik
Copy link
Contributor

Thanks @DavidS

tphoney added a commit that referenced this pull request Nov 26, 2015
(MODULES-2682) Update Apache Configuration to use FilesMatch instead …
@tphoney tphoney merged commit fc0692b into puppetlabs:master Nov 26, 2015
@DavidS DavidS deleted the modules-2682-fix-php-configuration branch November 26, 2015 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants