CodeIgniter Forums

Full Version: Disallowed Key Characters in url
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear All,

I 'm facing with this problem:
If I write URL with non-allowed characters like: xyz.hu/csöcsösnyúl I got this message: "Disallowed Key Characters.csöcsösnyúl". It is ok.
But If I call xyz.hu URL again I got the same message: Disallowed Key Characters.csöcsösnyúl. Why? If I delete the browser cache, or use incognito window, I can call the xyz.hu without error.
I don't understand  why.
Any idea?
Thanks in advance


Penteka
Hi all
 I've found this code:  source

Code:
$CFG =& load_class('Config');
        
$cook_key = array_keys($_COOKIE);
$safe_cook_key = array( '__utm',                        //google analytics
$CFG->item('cookie_prefix'));
foreach($cook_key as $val)
{          
   if(substr_compare($val, $safe_cook_key[0],0, strlen($safe_cook_key[0]))!=0 && substr_compare($val, $safe_cook_key[1],0, strlen($safe_cook_key[0]))!=0)
   {
       unset($_COOKIE[$val]);
   }              
}
$_COOKIE = $this->_clean_input_data($_COOKIE);

I inserted into system/core/Input.php. Now it works properly.
Ya hey!

Any comments very welcome Smile
Thx

penteka
You should never edit and mess with the System Core Files!!!

You extend them to make modifications.
(02-14-2018, 04:49 AM)InsiteFX Wrote: [ -> ]You should never edit and mess with the System Core Files!!!

You extend them to make modifications.

Hi InsiteFx,
Thank you for your response.

Please give me a suggestion how to extend the Input.php file correctly. 

thanks in advance

penteka
This is saved in - ./application/core/MY_Input.php

PHP Code:
class MY_Input extends CI_Input
{



If Library is in ./system/core then you      - Save in ./application/core/Filename.php

If Library is in ./system/libraries then you - Save in ./application/libraries/Filename.php