From 4495cc740c1c0e382cc62d3d174abd17c0b4d84f Mon Sep 17 00:00:00 2001 From: Hunter Wu Date: Sun, 4 Aug 2013 12:31:52 +0800 Subject: Rename bad chars property to filename_bad_chars, remove the setter and add changelog entry --- system/core/Security.php | 17 ++--------------- user_guide_src/source/changelog.rst | 1 + 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/system/core/Security.php b/system/core/Security.php index 3d04d5e12..70cf3e013 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -42,7 +42,7 @@ class CI_Security { * * @var array */ - public $sanitize_filename_str = array( + public $filename_bad_chars = array( '../', '', '<', '>', "'", '"', '&', '$', '#', '{', '}', '[', ']', '=', @@ -564,19 +564,6 @@ class CI_Security { // -------------------------------------------------------------------- - /** - * Set Sanitize Filename Strings - * - * @param array $strings - * @return void - */ - public function set_sanitize_filename_str($strings) - { - $this->sanitize_filename_str = $strings; - } - - // -------------------------------------------------------------------- - /** * Sanitize Filename * @@ -586,7 +573,7 @@ class CI_Security { */ public function sanitize_filename($str, $relative_path = FALSE) { - $bad = $this->sanitize_filename_str; + $bad = $this->filename_bad_chars; if ( ! $relative_path) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4cef0e683..fd1ce2dc0 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -416,6 +416,7 @@ Release Date: Not Released - Added method ``strip_image_tags()``. - Added ``$config['csrf_regeneration']``, which makes token regeneration optional. - Added ``$config['csrf_exclude_uris']``, which allows you list URIs which will not have the CSRF validation methods run. + - Changed ``sanitize_filename()``, makes filename_bad_chars a public property. - :doc:`URI Routing ` changes include: -- cgit v1.2.3-24-g4f1b