From b7074ee59588b74ff4ebb77dd1281941a3c99778 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 5 Jun 2012 20:50:08 -0700 Subject: Clean file paths in Kohana_Exception::debug_path(). Fixes #1880. --- modules/gallery/libraries/MY_Kohana_Exception.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/gallery/libraries/MY_Kohana_Exception.php') diff --git a/modules/gallery/libraries/MY_Kohana_Exception.php b/modules/gallery/libraries/MY_Kohana_Exception.php index dd04b25f..b74c80b1 100644 --- a/modules/gallery/libraries/MY_Kohana_Exception.php +++ b/modules/gallery/libraries/MY_Kohana_Exception.php @@ -94,4 +94,8 @@ class Kohana_Exception extends Kohana_Exception_Core { } return $result; } + + public static function debug_path($file) { + return html::clean(parent::debug_path($file)); + } } \ No newline at end of file -- cgit v1.2.3 From 03d55d25307054547378db123e30c59bebb6944f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 5 Jun 2012 21:25:56 -0700 Subject: Encode urls in 404 log entries. Fixes #1882. --- modules/gallery/libraries/MY_Kohana_Exception.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/libraries/MY_Kohana_Exception.php') diff --git a/modules/gallery/libraries/MY_Kohana_Exception.php b/modules/gallery/libraries/MY_Kohana_Exception.php index b74c80b1..0c07ea5e 100644 --- a/modules/gallery/libraries/MY_Kohana_Exception.php +++ b/modules/gallery/libraries/MY_Kohana_Exception.php @@ -23,7 +23,7 @@ class Kohana_Exception extends Kohana_Exception_Core { */ public static function text($e) { if ($e instanceof Kohana_404_Exception) { - return "File not found: " . Router::$complete_uri; + return "File not found: " . rawurlencode(Router::$complete_uri); } else { return sprintf( "%s [ %s ]: %s\n%s [ %s ]\n%s", -- cgit v1.2.3