diff options
author | Jonas <jonas@freesources.org> | 2024-03-06 11:29:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 11:29:28 +0100 |
commit | 782f8082287c54bc6f9446b0d450f63256929961 (patch) | |
tree | 8a846900855d5405f6d766c71c9e8acd372b7a92 /lib | |
parent | 0a64b69ab8e9b4350a40a03ee1b971a093417498 (diff) | |
parent | ea7a69579de0a90e09e2db4213fb2c3446bbaec9 (diff) | |
download | nextcloud-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.php | 2 |
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 |