aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-11-14 15:46:50 +0100
committerAndreas Fischer <bantu@phpbb.com>2011-11-14 15:46:50 +0100
commitf31da015fcad1efb792e78462af7eb56e1abcabc (patch)
treeb1f981fd095f751eec3b7f0c64164de43e6490de /phpBB/includes
parent9d7b144c54f28faf02f93740930dfb633c2e78cb (diff)
parent3302305cd4a499603784aa87a40f5170d62a4f26 (diff)
downloadforums-f31da015fcad1efb792e78462af7eb56e1abcabc.tar
forums-f31da015fcad1efb792e78462af7eb56e1abcabc.tar.gz
forums-f31da015fcad1efb792e78462af7eb56e1abcabc.tar.bz2
forums-f31da015fcad1efb792e78462af7eb56e1abcabc.tar.xz
forums-f31da015fcad1efb792e78462af7eb56e1abcabc.zip
Merge remote-tracking branch 'nickvergessen/ticket/9066' into develop-olympus
* nickvergessen/ticket/9066: [ticket/9066] Move regex into get_preg_expression function and add tests [ticket/9066] Disallow some database prefix to prevent same errors and problems
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 8017c379f3..817111491f 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3486,6 +3486,10 @@ function get_preg_expression($mode)
$inline = ($mode == 'relative_url') ? ')' : '';
return "(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
+
+ case 'table_prefix':
+ return '#^[a-zA-Z][a-zA-Z0-9_]*$#';
+ break;
}
return '';