Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2018-06-14 02:02:32 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-06-14 02:02:32 +0300
commit202bd2da16942ca8c9b667b10c75025a0c95980d (patch)
tree36d1fce86be64e8e0d1748932028b6b3dedf203a /app/controllers
parentadb069881ae0253c5bf3718aded02976f13fc859 (diff)
Backport InternalRedirect#sanitize_redirect
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/internal_redirect.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/concerns/internal_redirect.rb b/app/controllers/concerns/internal_redirect.rb
index 7409b2e89a5..10b9852e329 100644
--- a/app/controllers/concerns/internal_redirect.rb
+++ b/app/controllers/concerns/internal_redirect.rb
@@ -23,6 +23,10 @@ module InternalRedirect
nil
end
+ def sanitize_redirect(url_or_path)
+ safe_redirect_path(url_or_path) || safe_redirect_path_for_url(url_or_path)
+ end
+
def host_allowed?(uri)
uri.host == request.host &&
uri.port == request.port