From 67daf109f2b10846230115a92ddd964af14299e0 Mon Sep 17 00:00:00 2001 From: czaks Date: Sun, 4 Aug 2013 22:12:21 -0400 Subject: [PATCH 1/3] fix Varnish compatibility when characters such as * are in use for a boardname --- inc/functions.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 01fdb18e..74ab96e9 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -388,9 +388,12 @@ function purge($uri) { global $config, $debug; // Fix for Unicode - $uri = urlencode($uri); - $uri = str_replace("%2F", "/", $uri); - $uri = str_replace("%3A", ":", $uri); + $uri = rawurlencode($uri); + + $noescape = "/!~*()+:"; + $noescape = preg_split('//', $noescape); + $noescape_url = array_map("rawurlencode", $noescape); + $uri = str_replace($noescape_url, $noescape, $uri); if (preg_match($config['referer_match'], $config['root']) && isset($_SERVER['REQUEST_URI'])) { $uri = (str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/') . $uri; From 5bebceb96b30378d15f053c2487a58a892c96f38 Mon Sep 17 00:00:00 2001 From: czaks Date: Sun, 4 Aug 2013 22:49:38 -0400 Subject: [PATCH 2/3] fix for boards containing + character; they were previously unaccessible in mod panel --- mod.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod.php b/mod.php index a01a0297..be66db78 100644 --- a/mod.php +++ b/mod.php @@ -18,7 +18,7 @@ if (get_magic_quotes_gpc()) { $_POST = strip_array($_POST); } -$query = isset($_SERVER['QUERY_STRING']) ? urldecode($_SERVER['QUERY_STRING']) : ''; +$query = isset($_SERVER['QUERY_STRING']) ? rawurldecode($_SERVER['QUERY_STRING']) : ''; $pages = array( '' => ':?/', // redirect to dashboard From 1248e329d20eeddbd9eea3b81bb59d42461d0893 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Mon, 5 Aug 2013 05:05:38 -0400 Subject: [PATCH 3/3] remove maximum-scale in --- templates/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/header.html b/templates/header.html index c1230f0e..6929fdca 100644 --- a/templates/header.html +++ b/templates/header.html @@ -1,7 +1,7 @@ {% if config.url_favicon %}{% endif %} - + {% if config.meta_keywords %}{% endif %} {% if config.default_stylesheet.1 != '' %}{% endif %} {% if config.font_awesome %}{% endif %}