summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/config.php3
-rw-r--r--inc/functions.php2
2 files changed, 1 insertions, 4 deletions
diff --git a/inc/config.php b/inc/config.php
index 90e66a2c..e1929766 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -1444,6 +1444,3 @@
// is the absolute maximum, because MySQL cannot handle table names greater than 64 characters.
$config['board_regex'] = '[0-9a-zA-Z$_\x{0080}-\x{FFFF}]{1,58}';
- // Regex for URLs.
- $config['url_regex'] = '@^(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?«»“”‘’]))$@';
-
diff --git a/inc/functions.php b/inc/functions.php
index 5a95c851..377607fb 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($config['url_regex'], $config['root']) ? '' :
+ (preg_match('@^https?:@//', $config['root']) ? '' :
'https?:\/\/' . $_SERVER['HTTP_HOST']) .
preg_quote($config['root'], '/') .
'(' .