apeisa Posted February 28, 2013 Share Posted February 28, 2013 I am getting this kind of error messages in regular interval (about every 5 minutes): Page: http://www.mysite.com/http404/ User: guest Error Exception: Unknown Selector operator: '%' -- was your selector value properly escaped? (in /path/to/site/wire/core/Selectors.php line 165) I suspect that it is caused by some bot or other program that queries some url of our site - since I get equal amount of emails day and night - and they are always by guests, never logged in users. Also client haven't noticed anything strange. I haven't figured out how to duplicate that issue. Any clues how I could get more information what is causing that? I have tried all kind of obscure urls on my site, without any luck. Link to comment Share on other sites More sharing options...
Luis Posted February 28, 2013 Share Posted February 28, 2013 which analytics tracks your site? maybe you look which visit matches the time of your exception mail and dig into the visitor actions funnel. 1 Link to comment Share on other sites More sharing options...
Soma Posted February 28, 2013 Share Posted February 28, 2013 % looks lik it could be encoded url. 1 Link to comment Share on other sites More sharing options...
Wanze Posted February 28, 2013 Share Posted February 28, 2013 Do you throw any GET vars into a selector? 1 Link to comment Share on other sites More sharing options...
apeisa Posted February 28, 2013 Author Share Posted February 28, 2013 Thanks guys. Luis: Google Analytics doesn't show anything, I don't think it get's a change to log those requests, since exception is thrown. Soma: my guesses are on same line. Wanze: in few places yep, but so far haven't found anything where I don't run those through sanitizer. Link to comment Share on other sites More sharing options...
DaveP Posted February 28, 2013 Share Posted February 28, 2013 @apeisa Could you not write a bit of logging code that hooks in before pageNotFound, like your redirect module? 1 Link to comment Share on other sites More sharing options...
apeisa Posted February 28, 2013 Author Share Posted February 28, 2013 DaveP: thanks. I got this solved just before your tip. I ended up using pretty much similar solution, used this logging just in the beginning of 404 template: $log = new FileLog($this->config->paths->logs . 'mysterious404.txt'); $log->save("url: " . $_SERVER['REQUEST_URI']); And then I noticed, that few urls that had , in their ?get=something,like,this That alone doesn't do any harm, but in that site I had autoload module, that did some redirects (hooked to pageNotFound). There i had this code: $url = $_SERVER['REQUEST_URI']; $url = $this->sanitizer->selectorValue($url); $p = $this->pages->get($url); if ($p->id)... That ->get($url) was the part that was causing problems. I have now simplified that redirect module so that it doesn't need to make that get query at all anymore. Thanks all for your help (and Ville from our office!). 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now