Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter error Disallowed Key Characters
#1
Bug 

Good afternoon.

When integrating a script into CodeIgniter framefork, the whole site is blocked and the Disallowed Key Characters error is displayed. Some kind of framework protection? How to bypass it? And how to restore the site?

Working with form, post method
Reply
#2

CSRF protection? See Manual for Filters
Reply
#3

If you are not a bot, I recommend to upgrade to CodeIgniter 4.
Sorry if you are a human, there are a lot of posts by bots in this forums.

The error message "Disallowed Key Characters" is not in CI3 or 4.
It was probably in CI2.
Reply
#4

(12-21-2023, 02:09 PM)kenjis Wrote: If you are not a bot, I recommend to upgrade to CodeIgniter 4.
Sorry if you are a human, there are a lot of posts by bots in this forums.

The error message "Disallowed Key Characters" is not in CI3 or 4.
It was probably in CI2.

So, my old site on CodeIgniter 2, I don't know how to programming, so I can't upgrade to the new version of CodeIgniter. I thank you on the Internet, I found a way out for whoever needs it, I will leave it here. 

application/config/config.php
PHP Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';

system/core/Input.php 
PHP Code:
if ( ! preg_match("/^[a-z0-9:_\/-]+$/i"$str))
{
  exit('Disallowed Key Characters.');
}

or
if ( ! 
preg_match("/^[a-z0-9:_\/-=]+$/i"$str))
{
  exit('Disallowed Key Characters.'$str);
}


Reply




Theme © iAndrew 2016 - Forum software by © MyBB