1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-24 07:30:10 +01:00

mod.php: Don't freak out if extra dummy query parameters are added.

(Such as for cache-avoidance.)
This commit is contained in:
Macil Tech 2013-03-03 00:41:00 +08:00
parent b6fc7ca89d
commit fa9c2a0fd1

View File

@ -105,7 +105,7 @@ $new_pages = array();
foreach ($pages as $key => $callback) {
if (preg_match('/^secure /', $callback))
$key .= '(/(?P<token>[a-f0-9]{8}))?';
$new_pages[@$key[0] == '!' ? $key : "!^$key$!"] = $callback;
$new_pages[@$key[0] == '!' ? $key : '!^' . $key . '(?:&[^&=]+=[^&]*)*$!'] = $callback;
}
$pages = $new_pages;