From 4cd23896559dbbcd0bae5746ee458ece36be7a65 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sun, 15 Sep 2013 05:48:37 +1000 Subject: [PATCH] lol --- inc/functions.php | 2 +- post.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 377607fb..4cbd8625 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -94,7 +94,7 @@ function loadConfig() { if (!isset($config['referer_match'])) if (isset($_SERVER['HTTP_HOST'])) { $config['referer_match'] = '/^' . - (preg_match('@^https?:@//', $config['root']) ? '' : + (preg_match('@^https?://@', $config['root']) ? '' : 'https?:\/\/' . $_SERVER['HTTP_HOST']) . preg_quote($config['root'], '/') . '(' . diff --git a/post.php b/post.php index fc23b47b..1fe3b35f 100644 --- a/post.php +++ b/post.php @@ -273,7 +273,7 @@ if (isset($_POST['delete'])) { if ($config['allow_upload_by_url'] && isset($_POST['file_url']) && !empty($_POST['file_url'])) { $post['file_url'] = $_POST['file_url']; - if (!preg_match('@^https?:@//', $post['file_url'])) + if (!preg_match('@^https?://@', $post['file_url'])) error($config['error']['invalidimg']); if (mb_strpos($post['file_url'], '?') !== false)