aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-12-28 22:53:59 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-12-28 22:53:59 +0100
commitd63b644b2b976b6b067f779af91cc7699c4bd522 (patch)
treeb7f19ef4f4dbe16156a99428b19f3dee6423d612 /phpBB/includes/functions.php
parent442d21ace2b5d33e328917d7e7ac536709ba4d5c (diff)
parent90a77ba9d3e97718e9da7d1ee95ece4e756d26b7 (diff)
downloadforums-d63b644b2b976b6b067f779af91cc7699c4bd522.tar
forums-d63b644b2b976b6b067f779af91cc7699c4bd522.tar.gz
forums-d63b644b2b976b6b067f779af91cc7699c4bd522.tar.bz2
forums-d63b644b2b976b6b067f779af91cc7699c4bd522.tar.xz
forums-d63b644b2b976b6b067f779af91cc7699c4bd522.zip
Merge branch 'ticket/security-203' into ticket/security-203-rhea
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 39d22254a2..f4e0ac8b26 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2815,6 +2815,11 @@ function get_preg_expression($mode)
case 'path_remove_dot_trailing_slash':
return '#^(?:(\.)?)+(?:(.+)?)+(?:([\\/\\\])$)#';
break;
+
+ case 'semantic_version':
+ // Regular expression to match semantic versions by http://rgxdb.com/
+ return '/(?<=^[Vv]|^)(?:(?<major>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<minor>(?:0|[1-9](?:(?:0|[1-9])+)*))[.](?<patch>(?:0|[1-9](?:(?:0|[1-9])+)*))(?:-(?<prerelease>(?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:0|[1-9](?:(?:0|[1-9])+)*))(?:[.](?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:0|[1-9](?:(?:0|[1-9])+)*)))*))?(?:[+](?<build>(?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:(?:0|[1-9])+))(?:[.](?:(?:(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?|(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)(?:[A-Za-z]|-)(?:(?:(?:0|[1-9])|(?:[A-Za-z]|-))+)?)|(?:(?:0|[1-9])+)))*))?)$/';
+ break;
}
return '';