Getting the "Forbidden Key Characters" error in CodeIgniter
Had a similar problem, so for the sake of google search results:
__ utmt is a cookie. More specifically, the Google Analytics cookie. The "Number" part probably means a copy / duplicate of it. Think of it like the word.doc ~ 1 files that are stored on your computer when working in a Word document.
So first check the Google Analytics code on the website, is there a duplicate somewhere? My problem was solved by changing this duplicated line:
var pageTracker = _gat._getTracker("UA-1234567-89");
var pageTracker = _gat._getTracker("UA-1234567-89");
The weird thing is that the file always had this duplicate line of code as my GIT comes back. It could be a change in how the cookie code is handled by cookie ...
Oh, and the Forbidden Key Characters part. This is usually a good thing, protecting your CI application from harm.
Its in the file system \ core \ Input.php.
if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str)) {
// there is no ~ in this regex pattern
// You could add it, but you probably end up breaking other stuff ("/^[\w:~\/]+$/i")
exit('Disallowed Key Characters');
}
source to share
I was just going to comment, but apparently I don't have enough reputation. I had a similar problem this morning. This is caused by cookie (__utmt_ ~ 1). My site creates a cookie named __utmt, but not with a single underscore, tilde and 1. I suspect __utmt_ ~ 1 is a duplicate of the original cookie, but I'm not sure how it was created. However - clearing my cookies stopped the "Forbidden Key Characters" message.
source to share