From 4407af2b0f98fd5c906376766d47beea1b39ab62 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 14 Mar 2016 20:54:27 +0900 Subject: [PATCH] Use utf8_check to check variables in Security class --- common/framework/security.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/framework/security.php b/common/framework/security.php index 4bae27c39..b31eb81e4 100644 --- a/common/framework/security.php +++ b/common/framework/security.php @@ -20,22 +20,22 @@ class Security { // Escape HTML special characters. case 'escape': - if (!detectUTF8($input)) return false; + if (!utf8_check($input)) return false; return escape($input); // Strip all HTML tags. case 'strip': - if (!detectUTF8($input)) return false; + if (!utf8_check($input)) return false; return escape(strip_tags($input)); // Clean up HTML content to prevent XSS attacks. case 'html': - if (!detectUTF8($input)) return false; + if (!utf8_check($input)) return false; return Security\HTMLFilter::clean($input); // Clean up the input to be used as a safe filename. case 'filename': - if (!detectUTF8($input)) return false; + if (!utf8_check($input)) return false; return Security\FilenameFilter::clean($input); // Unknown filters return false.