From b76ae638462ab0f673e5915986070518dd3f9ad3 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 19 Aug 2021 09:08:42 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-2-stable-ee --- lib/gitlab/regex.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/gitlab/regex.rb') 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) (? [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) ) - (?\/(?: - [-\/$_.+!*'(),0-9a-z] (?# plain URL character) + (?/(?: + [-/$_.+!*'(),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 -- cgit v1.2.1