-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Short description of the issue
There may not be too many scenarios where this is important, but if you visit a URL which is blocked by this rule (https://github.com/processwire/processwire/blob/51629cdd5f381d3881133baf83e1bd2d9306f867/htaccess.txt#L367), apache redirects directly to index.php without any querystring parameters due to this rule (https://github.com/processwire/processwire/blob/51629cdd5f381d3881133baf83e1bd2d9306f867/htaccess.txt#L73)
The problem with Tracy is that it loads its js file via querystring params, eg:
http://pwtest.test/bla'h/?_tracy_bar=js&v=2.7.3&XDEBUG_SESSION_STOP=1
Note the apostrophe inside bla'h
- this means that when apache redirects to index.php the querystring params are removed and Tracy doesn't load.
Optional: Suggestion for a possible fix
I wonder if it might be possible to make use of $_SERVER['REDIRECT_QUERY_STRING']
to add those back in so that Tracy can load?
Steps to reproduce the issue
- Make sure Tracy is running
- Load a page on the site with a character which isn't allowed by the htaccess regex restrictions, eg an apostrophe
- Note that the Tracy bar doesn't load and you get these errors:
http://pwtest.test/blah (no apostrophe)
http://pwtest.test/bla'h (with apostrophe)