'security' => array(
'output_filter' => array('Security::htmlentities'),
),
in my config file, and that works fine. Where exactly is this exception generated ( file and line # )?
As for the docs, that is clearly an omission that needs to be fixed. I've added it to the todo list for 1.2.1. /**
* Security settings
*/
'security' => array(
'csrf_autoload' => false,
'csrf_token_key' => 'fuel_csrf_token',
'csrf_expiration' => 0,
'uri_filter' => array('htmlentities'),
/**
* This input filter can be any normal PHP function as well as 'xss_clean'
*
* WARNING: Using xss_clean will cause a performance hit. How much is
* dependant on how much input data there is.
*/
'input_filter' => array(),
/**
* This output filter can be any normal PHP function as well as 'xss_clean'
*
* WARNING: Using xss_clean will cause a performance hit. How much is
* dependant on how much input data there is.
*/
'output_filter' => array('Security:htmlentities'),
/**
* Whether to automatically filter view data
*/
'auto_filter_output' => true,
/**
* With output encoding switched on all objects passed will be converted to strings or
* throw exceptions unless they are instances of the classes in this array.
*/
'whitelisted_classes' => array(
'Fuel\\Core\\Response',
'Fuel\\Core\\View',
'Fuel\\Core\\ViewModel',
'Closure',
)
),
The error is at: COREPATH/classes/security.php @ line 59// throw an exception if no the output filter setting is missing from the app config
57 if (\Config::get('security.output_filter', null) === null)
58 {
59 throw new \FuelException('There is no security.output_filter defined in your application config file');
60 }
61 }
No, nothing in config.php has been changed between 1.1 and 1.2. The only thing related is that output_filter is now required. But you've got it in there (albeit with a typo like Kenijs pointed out). Can you \Debug::dump(\Config::$items) in the Security class _init() method, so we know for sure there's nothing wrong with your loaded config? You don't have a config.php in your config/<environment> folder that would overwrite stuff in your global config file?Mitchell wrote on Sunday 17th of June 2012:Is there perhaps a significant change in v1.2 that I'm missing?
<?php
// Load in the Autoloader
require COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php';
class_alias('Fuel\\Core\\Autoloader', 'Autoloader');
// Bootstrap the framework DO NOT edit this
require COREPATH.'bootstrap.php';
Autoloader::add_classes(array(
// Add classes you want to override here
// Example: 'View' => APPPATH.'classes/view.php',
));
// Register the autoloader
Autoloader::register();
/**
* Your environment. Can be set to any of the following:
*
* Fuel::DEVELOPMENT
* Fuel::TEST
* Fuel::STAGE
* Fuel::PRODUCTION
*/
Fuel::$env = (isset($_SERVER['FUEL_ENV']) ? $_SERVER['FUEL_ENV'] : Fuel::DEVELOPMENT);
// Initialize the framework with the config file.
Fuel::init('config.php');
// Initialize the framework with the config file.
Fuel::init('config.php');
If this is present than I can't conclude other than the config is loaded file (you could check that in the Fuel::init method), but something in your code is resetting/overwriting the config. It looks like you're new here. If you want to get involved, click one of these buttons!