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:
Diffstat (limited to 'lib/extracts_ref.rb')
-rw-r--r--lib/extracts_ref.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/extracts_ref.rb b/lib/extracts_ref.rb
index daba0452318..9799116038e 100644
--- a/lib/extracts_ref.rb
+++ b/lib/extracts_ref.rb
@@ -126,8 +126,10 @@ module ExtractsRef
# overridden in subclasses, do not remove
def get_id
- id = [params[:id] || params[:ref]]
- id << "/" + params[:path] unless params[:path].blank?
+ allowed_params = params.permit(:id, :ref, :path)
+
+ id = [allowed_params[:id] || allowed_params[:ref]]
+ id << "/" + allowed_params[:path] unless allowed_params[:path].blank?
id.join
end