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

Issue 677574 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Payment Request API fails because of depth limit on JS dictionary parsing

Project Member Reported by jdonnelly@chromium.org, Dec 29 2016

Issue description

The Payment Request spec (https://w3c.github.io/browser-payment-api/) defines a pretty deep structure of types (inside the PaymentRequest type) to be passed from the page to the browser.

The depth limit of 6 on dictionary values returned by JS evaluations (as established in http://crrev.com/2335483004) broke the API implementation on iOS. [mahmadi@ actually has a test in review which would have caught this. My bad for not establishing such a test earlier.]

Can I increase the depth limit to 8 or was that limit based on some analysis? That would cover everything in the spec.
 
Components: -Blink>Payments UI>Browser>Autofill>Payments
Cc: -eugene...@chromium.org jif@chromium.org
Owner: eugene...@chromium.org
Status: Assigned (was: Untriaged)
Cc: -jif@chromium.org eugene...@chromium.org
Owner: jif@chromium.org
Assigning back to jif@ who implemented recursion limit and probably remembers why we have limit of 6.
Chrome's JSON parser has a depth limit of 1000, btw.
Project Member

Comment 5 by bugdroid1@chromium.org, Jan 5 2017

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

commit 1ba585a2d3f47b3f80cb12ea5b559858b1807c8f
Author: mahmadi <mahmadi@chromium.org>
Date: Thu Jan 05 16:44:39 2017

Increases the depth of parsing dictionaries returned by JS evaluation

BUG= 677574 

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

[modify] https://crrev.com/1ba585a2d3f47b3f80cb12ea5b559858b1807c8f/ios/web/web_state/ui/web_view_js_utils.mm

Cc: -mahmadi@chromium.org jif@chromium.org
Owner: mahmadi@chromium.org
Status: Fixed (was: Assigned)

Comment 7 by jif@chromium.org, Jan 6 2017

The depth limit of 6 was arbitrary; Increasing it to 8 is fine.
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments

Sign in to add a comment