From 5661e32b1ce977d4fe98b73f468bdf5695464c56 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Wed, 30 Jan 2013 04:45:38 +1100 Subject: Instead of showing $config['error']['malformed'] on corrupt session, just go straight to the login form --- mod.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod.php') diff --git a/mod.php b/mod.php index a51f4bcd..8045cf47 100644 --- a/mod.php +++ b/mod.php @@ -5,8 +5,8 @@ */ require 'inc/functions.php'; -require 'inc/mod/auth.php'; require 'inc/mod/pages.php'; +require 'inc/mod/auth.php'; // Fix for magic quotes if (get_magic_quotes_gpc()) { -- cgit v1.3 From 4c45689528a0448b6e6808817104f132880c0ac7 Mon Sep 17 00:00:00 2001 From: czaks Date: Sun, 26 May 2013 17:52:33 -0400 Subject: vichan specific fix to facilitate using "." and "+" in boardnames --- mod.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod.php') diff --git a/mod.php b/mod.php index c0614754..6257fe53 100644 --- a/mod.php +++ b/mod.php @@ -45,7 +45,7 @@ $pages = array( '/news/(\d+)' => 'news', // view news '/news/delete/(\d+)' => 'news_delete', // delete from news - '/edit/(\w+)' => 'edit_board', // edit board details + '/edit/([\w+.]+)' => 'edit_board', // edit board details '/new-board' => 'new_board', // create a new board '/rebuild' => 'rebuild', // rebuild static files -- cgit v1.3 From fa9c2a0fd1ce4b188361a863208334c8f6b312e5 Mon Sep 17 00:00:00 2001 From: Macil Tech Date: Sun, 3 Mar 2013 00:41:00 +0800 Subject: mod.php: Don't freak out if extra dummy query parameters are added. (Such as for cache-avoidance.) --- mod.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod.php') diff --git a/mod.php b/mod.php index 9de2c15b..641d2115 100644 --- a/mod.php +++ b/mod.php @@ -105,7 +105,7 @@ $new_pages = array(); foreach ($pages as $key => $callback) { if (preg_match('/^secure /', $callback)) $key .= '(/(?P[a-f0-9]{8}))?'; - $new_pages[@$key[0] == '!' ? $key : "!^$key$!"] = $callback; + $new_pages[@$key[0] == '!' ? $key : '!^' . $key . '(?:&[^&=]+=[^&]*)*$!'] = $callback; } $pages = $new_pages; -- cgit v1.3 From 230b5de16ed0e50843136efffdef85e7df8c91b1 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Mon, 15 Jul 2013 08:17:49 -0400 Subject: Bug fix: Error when using anonymous functions for mod pages --- mod.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod.php') diff --git a/mod.php b/mod.php index eb99c0fb..42196ef2 100644 --- a/mod.php +++ b/mod.php @@ -103,7 +103,7 @@ if (isset($config['mod']['custom_pages'])) { $new_pages = array(); foreach ($pages as $key => $callback) { - if (preg_match('/^secure /', $callback)) + if (is_string($callback) && preg_match('/^secure /', $callback)) $key .= '(/(?P[a-f0-9]{8}))?'; $new_pages[@$key[0] == '!' ? $key : '!^' . $key . '(?:&[^&=]+=[^&]*)*$!'] = $callback; } @@ -113,7 +113,7 @@ foreach ($pages as $uri => $handler) { if (preg_match($uri, $query, $matches)) { $matches = array_slice($matches, 1); - if (preg_match('/^secure(_POST)? /', $handler, $m)) { + if (is_string($handler) && preg_match('/^secure(_POST)? /', $handler, $m)) { $secure_post_only = isset($m[1]); if (!$secure_post_only || $_SERVER['REQUEST_METHOD'] == 'POST') { $token = isset($matches['token']) ? $matches['token'] : (isset($_POST['token']) ? $_POST['token'] : false); -- cgit v1.3