From 666c807fccf4f360fac667e9a7ab6b7e560b3a6c Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 30 Jun 2009 20:47:51 -0700 Subject: Revert "Add Session::abort_save() to Kohana." Obsoleted by upstream fix. This reverts commit 06f066164f60fe0babbc7a480e6319a0702e0c46. --- modules/gallery/controllers/file_proxy.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'modules/gallery/controllers/file_proxy.php') diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index 0d64bcd9..1f885e53 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -112,9 +112,6 @@ class File_Proxy_Controller extends Controller { kohana::show_404(); } - // We don't need to save the session for this request - Session::abort_save(); - // Dump out the image header("Content-Type: $item->mime_type"); Kohana::close_buffers(false); -- cgit v1.2.3 From 132bd8306e444c46d3e588bdc1b21fa4474f2a98 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 30 Jun 2009 20:51:02 -0700 Subject: Re-add Session::abort_save(). It was reverted as part of the earlier change, but this is the part that we want to keep. --- modules/gallery/controllers/file_proxy.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/gallery/controllers/file_proxy.php') diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index 1f885e53..0d64bcd9 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -112,6 +112,9 @@ class File_Proxy_Controller extends Controller { kohana::show_404(); } + // We don't need to save the session for this request + Session::abort_save(); + // Dump out the image header("Content-Type: $item->mime_type"); Kohana::close_buffers(false); -- cgit v1.2.3 From 980923839930fde45120872dcadd437abfbbc09d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 11 Jul 2009 19:17:12 -0700 Subject: Unescape ' also (single quote) --- modules/gallery/controllers/file_proxy.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/gallery/controllers/file_proxy.php') diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index 0d64bcd9..03303d66 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -32,8 +32,9 @@ class File_Proxy_Controller extends Controller { $request_uri = $this->input->server("REQUEST_URI"); $request_uri = preg_replace("/\?.*/", "", $request_uri); - // Unescape %7E ("~") and %20 (" ") - $request_uri = str_replace(array("%7E", "%20"), array("~", " "), $request_uri); + // Unescape %7E (~), %20 ( ) and ' (') + // @todo: figure out why we have to do this and unescape everything appropriate + $request_uri = str_replace(array("%7E", "%20", "'"), array("~", " ", "'"), $request_uri); // var_uri: http://example.com/gallery3/var/ $var_uri = url::file("var/"); -- cgit v1.2.3 From 9588e8604d46e548dc4ac8788589f9f89b1992ab Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 12 Jul 2009 20:08:02 -0700 Subject: Use %27 instead of ' (the latter is the wrong form of escaping for urls). --- modules/gallery/controllers/file_proxy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gallery/controllers/file_proxy.php') diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index 03303d66..c5b34033 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -32,9 +32,9 @@ class File_Proxy_Controller extends Controller { $request_uri = $this->input->server("REQUEST_URI"); $request_uri = preg_replace("/\?.*/", "", $request_uri); - // Unescape %7E (~), %20 ( ) and ' (') + // Unescape %7E (~), %20 ( ) and %27 (') // @todo: figure out why we have to do this and unescape everything appropriate - $request_uri = str_replace(array("%7E", "%20", "'"), array("~", " ", "'"), $request_uri); + $request_uri = str_replace(array("%7E", "%20", "%27"), array("~", " ", "'"), $request_uri); // var_uri: http://example.com/gallery3/var/ $var_uri = url::file("var/"); -- cgit v1.2.3