Tighten up prohibited_key method

This commit is contained in:
charlieablett 2019-04-26 09:40:00 +12:00
parent 8eae788fd4
commit 4bd331a568
1 changed files with 2 additions and 3 deletions

View File

@ -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)