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

[eluser]sigornjw[/eluser]
Hi,
In my code I receive post value with "!" character.
To avoid "Disallowed Key Characters" problem I'm using MY_Input.php class in application/core:
Code:
<?php
class MY_Input extends CI_Input {
  function __construct()
  {
    parent::__construct();
  }

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

    // Clean UTF-8 if supported
    if (UTF8_ENABLED === TRUE)
    {
      $str = $this->uni->clean_string($str);
    }

    return $str;
  }
}
<b>It takes effect on my local mashine</b> but <b>it doesn't work on the web</b>!?

Any help, please!


Messages In This Thread
Disallowed Key Characters problem - by El Forum - 02-21-2012, 10:43 AM
Disallowed Key Characters problem - by El Forum - 02-21-2012, 11:06 AM
Disallowed Key Characters problem - by El Forum - 02-21-2012, 11:09 AM
Disallowed Key Characters problem - by El Forum - 02-21-2012, 11:15 AM
Disallowed Key Characters problem - by El Forum - 02-21-2012, 11:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB