diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-15 14:02:27 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-15 14:02:27 +0300 |
commit | 59a2123db285ba738375f6c713a91df27085367a (patch) | |
tree | ca4c60a9c116a8cf8aae741c8be1aa90dd68a8fc /app/controllers | |
parent | f39582f7b8cc9f1fdb74b58eece944110fc0a625 (diff) | |
parent | 202bd2da16942ca8c9b667b10c75025a0c95980d (diff) |
Merge branch 'ce-jej/sanitize-group-saml-relay-state' into 'master'
[CE backport] Backport InternalRedirect#sanitize_redirect
See merge request gitlab-org/gitlab-ce!19795
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/concerns/internal_redirect.rb | 4 |
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 |