summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-01 11:56:00 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-01 11:56:00 +0000
commitf12386aa9acf19877161bfc77e55572f40509cc4 (patch)
treec54e5216f4a7a71fb446e7c3708cb6941a291ce2 /lib
parentb64b61bfe72c54fe4a7fdce34b2f1591e3822e5e (diff)
downloadgitlab-ce-f12386aa9acf19877161bfc77e55572f40509cc4.tar.gz
Add latest changes from gitlab-org/security/gitlab@15-5-stable-ee
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/patch/uri.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/gitlab/patch/uri.rb b/lib/gitlab/patch/uri.rb
new file mode 100644
index 00000000000..b3a34b5a68e
--- /dev/null
+++ b/lib/gitlab/patch/uri.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Patch
+ module Uri
+ module ClassMethods
+ def parse(uri)
+ raise URI::InvalidURIError, "URI is too long" if uri && uri.to_s.length > 15_000
+
+ super
+ end
+ end
+ end
+ end
+end