WIP
This commit is contained in:
parent
d34e4f6828
commit
07babc37ed
4
mod.php
4
mod.php
|
@ -138,8 +138,10 @@ if (isset($config['mod']['custom_pages'])) {
|
||||||
|
|
||||||
$new_pages = array();
|
$new_pages = array();
|
||||||
foreach ($pages as $key => $callback) {
|
foreach ($pages as $key => $callback) {
|
||||||
if (is_string($callback) && preg_match('/^secure /', $callback))
|
if (is_string($callback) && preg_match('/^secure /', $callback)) {
|
||||||
$key .= '(/(?P<token>[a-f0-9]{8}))?';
|
$key .= '(/(?P<token>[a-f0-9]{8}))?';
|
||||||
|
}
|
||||||
|
|
||||||
$key = str_replace('\%b', '?P<board>' . sprintf(substr($config['board_path'], 0, -1), $config['board_regex']), $key);
|
$key = str_replace('\%b', '?P<board>' . sprintf(substr($config['board_path'], 0, -1), $config['board_regex']), $key);
|
||||||
$new_pages[@$key[0] == '!' ? $key : '!^' . $key . '(?:&[^&=]+=[^&]*)*$!u'] = $callback;
|
$new_pages[@$key[0] == '!' ? $key : '!^' . $key . '(?:&[^&=]+=[^&]*)*$!u'] = $callback;
|
||||||
}
|
}
|
||||||
|
|
3
post.php
3
post.php
|
@ -498,6 +498,7 @@ function handle_post(){
|
||||||
(!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], rawurldecode($_SERVER['HTTP_REFERER'])))) {
|
(!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], rawurldecode($_SERVER['HTTP_REFERER'])))) {
|
||||||
|
|
||||||
print_err("Missing REFERRER");
|
print_err("Missing REFERRER");
|
||||||
|
print_err($config['referer_match']);
|
||||||
error($config['error']['referer']);
|
error($config['error']['referer']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,7 +532,7 @@ function handle_post(){
|
||||||
|
|
||||||
print_err("Mod block 1 pass");
|
print_err("Mod block 1 pass");
|
||||||
|
|
||||||
if (!$post['mod']) {
|
if (!$post['mod'] && $config['spam']['enabled'] == true) {
|
||||||
$post['antispam_hash'] = checkSpam(
|
$post['antispam_hash'] = checkSpam(
|
||||||
array($board['uri'],
|
array($board['uri'],
|
||||||
isset($post['thread']) ? $post['thread'] : ($config['try_smarter'] && isset($_POST['page']) ? 0 - (int)$_POST['page'] : null))
|
isset($post['thread']) ? $post['thread'] : ($config['try_smarter'] && isset($_POST['page']) ? 0 - (int)$_POST['page'] : null))
|
||||||
|
|
Loading…
Reference in New Issue