lib/mihari/analyzers/rule.rb in mihari-4.5.2 vs lib/mihari/analyzers/rule.rb in mihari-4.5.3

- old
+ new

@@ -125,12 +125,15 @@ # Check whether a value is a disallowed data value or not # # @return [Boolean] # def disallowed_data_value?(value) - normalized_disallowed_data_values.any? do |disallowed_data_value| - return value == disallowed_data_value if disallowed_data_value.is_a?(String) - return disallowed_data_value.match?(value) if disallowed_data_value.is_a?(Regexp) + return true if normalized_disallowed_data_values.include?(value) + + normalized_disallowed_data_values.select do |disallowed_data_value| + disallowed_data_value.is_a?(Regexp) + end.any? do |disallowed_data_value| + disallowed_data_value.match?(value) end end private