PDA

View Full Version : jHackGuard/sh404sef



KenAdam
09-30-2010, 04:40 AM
When I enable jHackguard with sh404sef, I cannot access any of the pages other than the home page, as they return "illegal key character".
A search on google shows this message seems to be quite common with jHackguard in various circumstances, and the "fixes" involve turning off some or all of jHackguard's features.
Do you have a better solution, or can you at least explain what the pros and cons are of running jHG with some of the features turned off? i.e. is it still worth having?
It would be nice to have the source of the error message identified (as jHG) - just wasted a while trying to "fix" sh404sef configuration before finding out where the anonymous message came from.
Thanks,
Ken

Val
10-04-2010, 09:43 AM
The illegal key character error is only issued when a key of a variable (i.e its name) contains special characters which are generally not allowed and is not according to the RFC.

I'm unsure why sh404sef will add such a character (it is also possible that it does not, but jHackGuard is fooled to believe so). The fix is quite easy and you do not need to turn off other plugin features, but you would need to edit its code. Although it might sound complicated, all you need to do is to add // (that's two forward slashes) on line 371 in the jhackguard.php file, which should look like this:

// exit('Illegal key characters in global data');

That would stop the error from appearing and will allow the keys sh404sef supply to your Joomla.