Regex.escape Mime.EXTENSION_LOOKUP.keys #40

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Prevent all pages breaking when weird mime extensions gets into Mime.EXTENSION_LOOKUP
Fixes:

in routing_filter/filters/extension.rb:  67:in `mime_extension?'
RegexpError: unmatched close parenthesis: /\.all|text|txt|html|xhtml|js|css|ics|csv|xml|rss|atom|yaml|multipart_form|url_encoded_form|json|aspx|htmlbefore|html)|htm|html+++++++++++++++++++Result:+chosen+nickname+"wyduxxgs";+success+(from+first+page);(\?|$)/`

Will submit an issue to Rails 2.3.14 as of how these weird Mime type extensions could sneak into Mime.EXTENSION_LOOKUP

UPDATE: opened issue in rails issue tracker: rails/rails#7248

debreczeni referenced this pull request in rails/rails Oct 27, 2012

Closed

Weird unescaped values in Mime type lookup #7248

Collaborator

simi commented May 4, 2015

looks like outdated issue

simi closed this May 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment