Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

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 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 commented Jan 26, 2015

@jdoss thanks for the report, looking into it

@crowell
Copy link
Contributor

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 as completed 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants