New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 912548 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 885313



Sign in to add a comment

Allow accept to be a single value

Project Member Reported by jakearchibald@chromium.org, Dec 6

Issue description

Manifest:

{
  "name": "Squoosh",
  "short_name": "Squoosh",
  "start_url": "/",
  "display": "standalone",
  "orientation": "any",
  "background_color": "#fff",
  "theme_color": "#f78f21",
  "icons": [
    {
      "src": "/assets/icon-large.png",
      "type": "image/png",
      "sizes": "1024x1024"
    }
  ],
  "share_target": {
    "action": "/",
    "method": "POST",
    "enctype": "multipart/form-data",
    "params": {
      "files": [
        {
          "name": "file",
          "accept": "image/*"
        }
      ]
    }
  }
}


The "application > manifest" tab in Chrome devtools complains that share_target.files.accept is not an array, but the spec allows it to be a single string.
 
Cc: hartma...@chromium.org ericwilligers@chromium.org
Owner: hartma...@chromium.org
Fix is already in progress as part of https://chromium-review.googlesource.com/c/chromium/src/+/1361291
Status: Started (was: Untriaged)
Blocking: 885313
Project Member

Comment 5 by bugdroid1@chromium.org, Jan 7

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

commit 685a74c3ce8286ec5972b53df40300a7322307e3
Author: Glenn Hartmann <hartmanng@chromium.org>
Date: Mon Jan 07 17:01:48 2019

Fix a few ShareTargetFiles bugs in the WebAppManifest Parser.

Bugs fixed:
* don't crash if entries in 'accept' sequence are not strings
* allow 'accept' to be a single string
* allow 'files' to be a single ShareTargetFile

Bug: 911690, 912548
Change-Id: If930941dafaf61dbeb5b80d53a7684aa88f401b7
Reviewed-on: https://chromium-review.googlesource.com/c/1361291
Commit-Queue: Glenn Hartmann <hartmanng@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620359}
[modify] https://crrev.com/685a74c3ce8286ec5972b53df40300a7322307e3/content/renderer/manifest/manifest_parser.cc
[modify] https://crrev.com/685a74c3ce8286ec5972b53df40300a7322307e3/content/renderer/manifest/manifest_parser.h
[modify] https://crrev.com/685a74c3ce8286ec5972b53df40300a7322307e3/content/renderer/manifest/manifest_parser_unittest.cc

Sign in to add a comment