Welcome Guest, Not a member yet? Register   Sign In
Disallowed Key Characters in url
#1

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
Reply
#2

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
Reply
#3

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

You extend them to make modifications.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

(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
Reply
#5

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
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB