Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Update
rubygem-actionpack-4_2
CVE-2016-0751.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2016-0751.patch of Package rubygem-actionpack-4_2
@@ -, +, @@ --- actionpack/lib/action_dispatch/http/mime_type.rb | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ a/actionpack/lib/action_dispatch/http/mime_type.rb @@ -23,7 +23,7 @@ module Mime SET = Mimes.new EXTENSION_LOOKUP = {} - LOOKUP = Hash.new { |h, k| h[k] = Type.new(k) unless k.blank? } + LOOKUP = {} class << self def [](type) @@ -146,7 +146,7 @@ module Mime end def lookup(string) - LOOKUP[string] + LOOKUP[string] || Type.new(string) end def lookup_by_extension(extension) @@ -225,9 +225,12 @@ module Mime end end + attr_reader :hash + def initialize(string, symbol = nil, synonyms = []) @symbol, @synonyms = symbol, synonyms @string = string + @hash = [@string, @synonyms, @symbol].hash end def to_s @@ -261,6 +264,13 @@ module Mime end end + def eql?(other) + super || (self.class == other.class && + @string == other.string && + @synonyms == other.synonyms && + @symbol == other.symbol) + end + def =~(mime_type) return false if mime_type.blank? regexp = Regexp.new(Regexp.quote(mime_type.to_s)) @@ -274,6 +284,10 @@ module Mime end + protected + + attr_reader :string, :synonyms + private def to_ary; end --
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor