Reputation: 317
I've got a problem with CI Disallowed Key Character. When I am changing the core file input.php
exit('Disallowed Key Characters!! Clear Your Cookies.'.$str);
I get this string
Disallowed Key Characters!!.qqfilechunk|attraction-Pulaki-temple-not-far-from-Jimbaran-seminyak-kuta-leagian-nusa-dua-and-sanur-close-to-cheap-hotels-cheap-flight-with-air-asia-4-can-be-great-experience-to-come-to-bali-and-enj-_jpg|101077|2000000
I have changed the pregmatch
to
preg_match("/^[#a-z0-9:_\/-|{}()%!=]+$/i", $str)
But I still get the Disallowed Key Character
message.
Upvotes: 1
Views: 416
Reputation: 101473
You have a few issues with your regex:
-
must go at the end of the character block, as usually this denotes a range of characters.
full stop character.Change your regex to this:
/^[#a-z0-9:_\/|{}()%!=.-]+$/i
A RegexPal test page is available here.
Upvotes: 1
Reputation: 2852
Change it to:
preg_match("/^[a-z0-9:_\/-]+$/i", $str)
it will avoid the error.
check your input tag also any missing quotes or something:
in this case the error occurs:
<input type="text" name="nam value=" " />
because i just miss the closing quotes of name tag !
check for these type of errors....
Upvotes: 0