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

Secure configs for php-fpm/pathinfo #735

Closed
jkroepke opened this issue Jan 9, 2016 · 2 comments
Closed

Secure configs for php-fpm/pathinfo #735

jkroepke opened this issue Jan 9, 2016 · 2 comments
Labels
bug Something isn't working

Comments

@jkroepke
Copy link
Contributor

jkroepke commented Jan 9, 2016

Hi,

nginx and php-fpm has some security issue about the pathinfo feature... see https://superuser.com/questions/717863/nginxphp-fpm-setup-why-is-this-configuration-workaround-needed-to-properly-set for more informations..)

A recommended configuration is to use try_files. It must be under the fastcgi_split_path_info setting, currently this module write the try_files above fastcgi_split_path_info and should be changed. A pull request is available.

Due a bug in nginx, $fastcgi_split_path_info could be empty https://trac.nginx.org/nginx/ticket/321.

A workaround is to re-set the variable (see first comment in the issue). the set setting must be between fastcgi_split_path_info and fastcgi_pass. Currently I do not have any idea to implement this. A workaround is to hack the fastcgi_split_path like this:

fastcgi_split_path          => "^((?U).+?\\.php)(/.*)?\$;\nset \$path_info \$fastcgi_path_info;"

In my opinion , this should not be an valid solution..

@jkroepke jkroepke mentioned this issue Jan 9, 2016
@3flex 3flex added the bug Something isn't working label Aug 30, 2016
@wyardley
Copy link
Collaborator

This seems reasonable to me, going to try and get signoff and then merge #736

@bastelfreak
Copy link
Member

I'm closing this since the PR got merged. let us know if this still is an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants