Browse Source

lol

pull/40/head
Michael Foster 11 years ago
parent
commit
4cd2389655
  1. 2
      inc/functions.php
  2. 2
      post.php

2
inc/functions.php

@ -94,7 +94,7 @@ function loadConfig() {
if (!isset($config['referer_match'])) if (!isset($config['referer_match']))
if (isset($_SERVER['HTTP_HOST'])) { if (isset($_SERVER['HTTP_HOST'])) {
$config['referer_match'] = '/^' . $config['referer_match'] = '/^' .
(preg_match('@^https?:@//', $config['root']) ? '' : (preg_match('@^https?://@', $config['root']) ? '' :
'https?:\/\/' . $_SERVER['HTTP_HOST']) . 'https?:\/\/' . $_SERVER['HTTP_HOST']) .
preg_quote($config['root'], '/') . preg_quote($config['root'], '/') .
'(' . '(' .

2
post.php

@ -273,7 +273,7 @@ if (isset($_POST['delete'])) {
if ($config['allow_upload_by_url'] && isset($_POST['file_url']) && !empty($_POST['file_url'])) { if ($config['allow_upload_by_url'] && isset($_POST['file_url']) && !empty($_POST['file_url'])) {
$post['file_url'] = $_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']); error($config['error']['invalidimg']);
if (mb_strpos($post['file_url'], '?') !== false) if (mb_strpos($post['file_url'], '?') !== false)

Loading…
Cancel
Save