mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-21 18:44:37 +02:00
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
This commit is contained in:
@ -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 '';
|
||||
|
Reference in New Issue
Block a user