diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/gitlab/regex.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) | |
download | gitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r-- | lib/gitlab/regex.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index 0bd2ac180c3..698a417283e 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -184,19 +184,19 @@ module Gitlab # - Must not have a scheme, such as http:// or https:// # - Must not have a port number, such as :8080 or :8443 - @go_package_regex ||= / + @go_package_regex ||= %r{ \b (?# word boundary) (?<domain> [0-9a-z](?:(?:-|[0-9a-z]){0,61}[0-9a-z])? (?# first domain) (?:\.[0-9a-z](?:(?:-|[0-9a-z]){0,61}[0-9a-z])?)* (?# inner domains) \.[a-z]{2,} (?# top-level domain) ) - (?<path>\/(?: - [-\/$_.+!*'(),0-9a-z] (?# plain URL character) + (?<path>/(?: + [-/$_.+!*'(),0-9a-z] (?# plain URL character) | %[0-9a-f]{2})* (?# URL encoded character) )? (?# path) \b (?# word boundary) - /ix.freeze + }ix.freeze end def generic_package_version_regex @@ -416,7 +416,7 @@ module Gitlab end def base64_regex - @base64_regex ||= /(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?/.freeze + @base64_regex ||= %r{(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?}.freeze end def feature_flag_regex |