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

Check-fails on invalid urls instead of declining them. #888

Closed
jdoss opened this issue Jan 26, 2015 · 2 comments
Closed

Check-fails on invalid urls instead of declining them. #888

jdoss opened this issue Jan 26, 2015 · 2 comments

Comments

@jdoss
Copy link

@jdoss jdoss commented Jan 26, 2015

I have nginx-1.6.2 + mod_security + ngx_pagespeed-release-1.9.32.3-beta which is causing Nginx child processes to die when ModSecurity and ngx_pagespeed are enabled together. If I turn off ModSecurity then ngx_pagespeed does not crash nginx.

Here is the error log showing the crash, nginx -V and the gdb backtrace full on one of the core dumps:

https://gist.githubusercontent.com/jdoss/6161e4405f3ed42d53dd/raw/8fa2ddccb61077cd7a1b7b63cd38157512a3de87/nginx_pagespeed_modsec.txt

Here is my pagespeed settings in nginx.

pagespeed off;

pagespeed FileCachePath /var/ngx_pagespeed_cache;

pagespeed StatisticsPath /ngx_pagespeed_statistics;
pagespeed MessagesPath /ngx_pagespeed_message;
pagespeed ConsolePath /pagespeed_console;
pagespeed AdminPath /pagespeed_admin;

location /ngx_pagespeed_statistics { allow 127.0.0.1; deny all; }
location /ngx_pagespeed_message { allow 127.0.0.1; deny all; }
location /pagespeed_console { allow 127.0.0.1; deny all; }
location ~ ^/pagespeed_admin { allow 127.0.0.1; deny all; }

# Ensure requests for pagespeed optimized resources go to the pagespeed handler
# and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
  add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
@oschaaf
Copy link
Member

@oschaaf oschaaf commented Jan 26, 2015

@jdoss thanks for the report, looking into it

@crowell
Copy link
Contributor

@crowell crowell commented Jan 30, 2015

@jdoss #892 and https://code.google.com/p/modpagespeed/source/detail?r=4533 combined should fix this issue. thanks!

@crowell crowell closed this Jan 30, 2015
@jeffkaufman jeffkaufman changed the title ngx_pagespeed.cc(1811)] Check failed: url.IsWebValid(). Check-fails on invalid urls instead of declining them. Jul 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants