diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-31 02:08:55 -0400 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-31 02:08:55 -0400 |
| commit | 42cba538878cb695ba8b3093f72bc66ccd2fa074 (patch) | |
| tree | 5e0f74d1b933567dc76810d1f9cfb73ffe8efeda /post.php | |
| parent | 3bee1ba4fd16263ac4eefdf0bc8c7a3d11d8cccb (diff) | |
Allow Unicode in board URIs.
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -170,7 +170,7 @@ if (isset($_POST['delete'])) { error($config['error']['bot']); // Check the referrer - if (!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], $_SERVER['HTTP_REFERER'])) + if (!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], urldecode($_SERVER['HTTP_REFERER']))) error($config['error']['referer']); checkDNSBL(); @@ -547,9 +547,9 @@ if (isset($_POST['delete'])) { // Remove board directories before inserting them into the database. if ($post['has_file']) { $post['file_path'] = $post['file']; - $post['file'] = substr_replace($post['file'], '', 0, mb_strlen($board['dir'] . $config['dir']['img'])); + $post['file'] = mb_substr($post['file'], mb_strlen($board['dir'] . $config['dir']['img'])); if ($is_an_image && $post['thumb'] != 'spoiler') - $post['thumb'] = substr_replace($post['thumb'], '', 0, mb_strlen($board['dir'] . $config['dir']['thumb'])); + $post['thumb'] = mb_substr($post['thumb'], mb_strlen($board['dir'] . $config['dir']['thumb'])); } $post = (object)$post; |
