I am using CodeIgniter.
I set $config['global_xss_filtering'] = FALSE in a config file.
Then I find this code in system/core/Input.php:
$this->_enable_xss= (config_item('global_xss_filtering') === TRUE);
What actually this code it doing? It doesn’t look like a ternary statement. It seems to me is
$this->_enable_xss= (FALSE === TRUE);
In this case $this->_enable_xss returns FALSE?
This expands out to:
The part in
()(config_item('global_xss_filtering') === TRUE)is a boolean comparison which will returnTRUEorFALSE. That value is stored in$this->_enable_xss.So in your case, you are correct that you’re evaluating
… which sets
$this->_enable_xsstoFALSE.