Jump to content

Recommended Posts

Posted

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. 

Posted

which analytics tracks your site?

maybe you look which visit matches the time of your exception mail and dig into the visitor actions funnel. 

  • Like 1
Posted

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.

Posted

@apeisa Could you not write a bit of logging code that hooks in before pageNotFound, like your redirect module?

  • Like 1
Posted

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!).
  • Like 2

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...