summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJonas <jonas@freesources.org>2024-03-06 11:29:28 +0100
committerGitHub <noreply@github.com>2024-03-06 11:29:28 +0100
commit782f8082287c54bc6f9446b0d450f63256929961 (patch)
tree8a846900855d5405f6d766c71c9e8acd372b7a92 /lib
parent0a64b69ab8e9b4350a40a03ee1b971a093417498 (diff)
parentea7a69579de0a90e09e2db4213fb2c3446bbaec9 (diff)
downloadnextcloud-server-782f8082287c54bc6f9446b0d450f63256929961.tar.gz
nextcloud-server-782f8082287c54bc6f9446b0d450f63256929961.zip
Merge pull request #43997 from nextcloud/fix/url_regex
fix: Make URL pattern regexes match localhost and URLs with ports
Diffstat (limited to 'lib')
-rw-r--r--lib/public/IURLGenerator.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/public/IURLGenerator.php b/lib/public/IURLGenerator.php
index f62503f14ec..0c7dc070778 100644
--- a/lib/public/IURLGenerator.php
+++ b/lib/public/IURLGenerator.php
@@ -51,7 +51,7 @@ interface IURLGenerator {
*
* @since 25.0.0
*/
- public const URL_REGEX_NO_MODIFIERS = '(\s|\n|^)(https?:\/\/)((?:[-A-Z0-9+_]+\.)+[-A-Z]+(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|\n|$)';
+ public const URL_REGEX_NO_MODIFIERS = '(\s|\n|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|\n|$)';
/**
* Returns the URL for a route