summaryrefslogtreecommitdiff
path: root/lib/gitlab/utils.rb
diff options
context:
space:
mode:
authorGitLab Release Tools Bot <delivery-team+release-tools@gitlab.com>2023-01-31 11:45:59 +0000
committerGitLab Release Tools Bot <delivery-team+release-tools@gitlab.com>2023-01-31 11:45:59 +0000
commit637146034ce2a23df46d90b8e0b77d75553fdbb9 (patch)
tree7c6244459250fc610480d52bc0231f411d0547c4 /lib/gitlab/utils.rb
parentc3e54801bb461b6d53c48e3194f87cb5ebf3f5ba (diff)
parent383efe57adfb30756ce6ce0d3f47c32a33c2ca85 (diff)
downloadgitlab-ce-637146034ce2a23df46d90b8e0b77d75553fdbb9.tar.gz
Merge remote-tracking branch 'dev/15-8-stable' into 15-8-stable
Diffstat (limited to 'lib/gitlab/utils.rb')
-rw-r--r--lib/gitlab/utils.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/utils.rb b/lib/gitlab/utils.rb
index d3055569ece..8bd4cd2401d 100644
--- a/lib/gitlab/utils.rb
+++ b/lib/gitlab/utils.rb
@@ -4,6 +4,7 @@ module Gitlab
module Utils
extend self
PathTraversalAttackError ||= Class.new(StandardError)
+ DoubleEncodingError ||= Class.new(StandardError)
private_class_method def logger
@logger ||= Gitlab::AppLogger
@@ -55,7 +56,7 @@ module Gitlab
def decode_path(encoded_path)
decoded = CGI.unescape(encoded_path)
if decoded != CGI.unescape(decoded)
- raise StandardError, "path #{encoded_path} is not allowed"
+ raise DoubleEncodingError, "path #{encoded_path} is not allowed"
end
decoded