Skip to content

Commit

Permalink
Fix MIME validator
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoshaiyan committed Aug 29, 2024
1 parent 01a6e82 commit f90a662
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/mini_defender/rules/mime_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ def self.signature
end

def self.make(args)
raise ArgumentError, 'Expected at least one MIME type.' unless args.length > 0
unless args.length > 0
raise ArgumentError, 'Expected at least one MIME type.'
end

new(args.split(',').map(&:downcase).map(&:strip))
new(args.map(&:downcase).map(&:strip))
end

def passes?(attribute, value, validator)
Expand Down
2 changes: 1 addition & 1 deletion lib/mini_defender/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module MiniDefender
VERSION = "0.6.3"
VERSION = "0.6.4"
end

0 comments on commit f90a662

Please sign in to comment.