CodeIgniter Forums
"Disallowed Key Characters" because $_COOKIE were not cleared reasonable. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: "Disallowed Key Characters" because $_COOKIE were not cleared reasonable. (/showthread.php?tid=26050)

Pages: 1 2


"Disallowed Key Characters" because $_COOKIE were not cleared reasonable. - El Forum - 06-19-2014

[eluser]Unknown[/eluser]
Took a while to figure this one out. Seems most of us missed the obvious error...the last "-" is not escaped.

Adding the \. and | as I've seen other suggest may work for you, but the regex was supposed to be:

Code:
if ( ! preg_match("/^[a-z0-9:_\/\-\.|]+$/i", $str))