From 4bd331a568cff64f4097fdf0cc4e45727750f740 Mon Sep 17 00:00:00 2001 From: charlieablett Date: Fri, 26 Apr 2019 09:40:00 +1200 Subject: [PATCH] Tighten up prohibited_key method --- lib/gitlab/import_export/attribute_cleaner.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/gitlab/import_export/attribute_cleaner.rb b/lib/gitlab/import_export/attribute_cleaner.rb index 2d64ea77060..f476905b6db 100644 --- a/lib/gitlab/import_export/attribute_cleaner.rb +++ b/lib/gitlab/import_export/attribute_cleaner.rb @@ -29,10 +29,9 @@ module Gitlab return true if 'cached_markdown_version'.equal?(key) prohibited_suffixes = %w(_id _html) - prohibited_suffixes.each do |suffix| - return true if key.end_with?(suffix) + prohibited_suffixes.any? do |suffix| + true if key.end_with?(suffix) end - false end def allowed_reference?(key)