New issue
Advanced search Search tips

Issue 685932 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

net::GetExtensionsForMimeType() returns wrong results with prefix matching

Project Member Reported by nya@chromium.org, Jan 27 2017

Issue description

net::GetExtensionsForMimeType() returns wrong results due to prefix matching of MIME type strings.

For example:
- net::GetExtensionsForMimeType("image/b") -> "bmp"
- net::GetExtensionsForMimeType("") -> [all known extensions]


 

Comment 1 by eroman@chromium.org, Jan 30 2017

Components: Internals>Network
Owner: eroman@chromium.org
Status: Assigned (was: Untriaged)
That does indeed look broken.
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f6ef68261dc24e0500a99439575fdd9feeb712a6

commit f6ef68261dc24e0500a99439575fdd9feeb712a6
Author: eroman <eroman@chromium.org>
Date: Tue Jan 31 19:12:02 2017

Don't blindly do a prefix match when evaluating net::GetExtensionsForMimeType().

BUG= 685932 

Review-Url: https://codereview.chromium.org/2665953002
Cr-Commit-Position: refs/heads/master@{#447290}

[modify] https://crrev.com/f6ef68261dc24e0500a99439575fdd9feeb712a6/net/base/mime_util.cc
[modify] https://crrev.com/f6ef68261dc24e0500a99439575fdd9feeb712a6/net/base/mime_util_unittest.cc

Comment 3 by eroman@chromium.org, Jan 31 2017

Status: Fixed (was: Assigned)

Comment 4 by nya@chromium.org, Feb 1 2017

eroman: Thanks for the fix!

Sign in to add a comment