New issue
Advanced search Search tips

Issue 889420 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 29
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

WebP mime sniffing incorrect

Project Member Reported by jakearchibald@chromium.org, Sep 26

Issue description

https://cs.chromium.org/chromium/src/net/base/mime_sniffer.cc?type=cs&q=image/webp&sq=package:chromium&g=0&l=155

https://developers.google.com/speed/webp/docs/riff_container - the header end "VP8 ", or "VP8L" (lossless) or "VP8X" (extended, such as alpha).

This doesn't seem to stop us correctly sniffing webp in <img> (https://static-misc.glitch.me/webp-mime-sniff), so I'm not sure what the impact of this error is.
 
Owner: f...@opera.com
Status: Started (was: Untriaged)
For web pages this shouldn't be a problem (as you discovered), because the Blink image sniffer uses a wider pattern (the one from https://mimesniff.spec.whatwg.org/#matching-an-image-type-pattern), but this might cause problems in other (non-web page) usages.
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 29

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

commit 22af5afe1eb68315841eb4031fce9a8f2c9034dd
Author: Fredrik Söderquist <fs@opera.com>
Date: Sat Sep 29 00:38:43 2018

Fix WebP sniff pattern

The current pattern wouldn't be able to sniff the 'lossless' and
'extended' WebP formats.

Adjust the pattern to match the one described by [1].

[1] https://mimesniff.spec.whatwg.org/#matching-an-image-type-pattern

Bug:  889420 
Change-Id: I4b5a73d4d9477502d58df7460b9494e6540a59f3
Reviewed-on: https://chromium-review.googlesource.com/1248782
Reviewed-by: Asanka Herath <asanka@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#595273}
[modify] https://crrev.com/22af5afe1eb68315841eb4031fce9a8f2c9034dd/net/base/mime_sniffer.cc
[modify] https://crrev.com/22af5afe1eb68315841eb4031fce9a8f2c9034dd/net/base/mime_sniffer_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment