Total amount validation is wrong on Payment Request API
Reported by
shogo.se...@gmail.com,
Jan 29 2018
|
||||
Issue description
Example URL:
Steps to reproduce the problem:
If pass { total: { currency : 'JPY', amount: 1025 }} to second argument, throw TypeError: total amount value cannot be longer than 1024 characters.
What is the expected behavior?
What went wrong?
L185 `ios/chrome/browser/web/resources/payment_request.js`
>if (amount.value> __gCrWeb['paymentRequestManager'].MAX_STRING_LENGTH) {
should be
>if (amount.value.length > __gCrWeb['paymentRequestManager'].MAX_STRING_LENGTH) {
?
Does it occur on multiple sites: N/A
Is it a problem with a plugin? N/A
Did this work before? N/A
Does this work in other browsers? N/A
Chrome version: 64.0.3282.112 Channel: stable
OS Version: iOS 11.2.5
Flash Version:
,
Jan 29 2018
,
Jan 29 2018
,
Jan 31 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3184e8756918093253463900e1560758e630d965 commit 3184e8756918093253463900e1560758e630d965 Author: Mohamad Ahmadi <mahmadi@chromium.org> Date: Wed Jan 31 17:50:33 2018 [PR] Fixes a bug with the currency amount validation This CL fixes a bug where the value of the currency amount was being checked against the maximum allowed string length not the length of the value string. Bug: 806666 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: I8897c93f06e8cb590c5414497b53ab87fa291e77 Reviewed-on: https://chromium-review.googlesource.com/895546 Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org> Commit-Queue: Moe Ahmadi <mahmadi@chromium.org> Cr-Commit-Position: refs/heads/master@{#533317} [modify] https://crrev.com/3184e8756918093253463900e1560758e630d965/ios/chrome/browser/web/resources/payment_request.js
,
Jan 31 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by b...@chromium.org
, Jan 29 2018Owner: mahmadi@chromium.org
Status: Assigned (was: Unconfirmed)