Throw RangeError for invalid payment method identifiers |
||
Issue descriptionThrow RangeError for invalid payment method identifiers.
,
Sep 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0beaddc405726742b5545de252e6bf0a2d43edba commit 0beaddc405726742b5545de252e6bf0a2d43edba Author: Rouslan Solomakhin <rouslan@chromium.org> Date: Wed Sep 20 16:04:10 2017 [Payments] Validate payment method format. https://w3c.github.io/payment-request/#constructor "For each paymentMethod of methodData: Run the steps to validate a payment method identifier with paymentMethod.supportedMethods. If it returns false, then throw a RangeError exception and terminate this algorithm." https://www.w3.org/TR/payment-method-id/#dfn-validate-a-payment-method-identifier "The steps to validate a payment method identifier with a string pmi are given by the following algorithm. It returns true if the pmi is valid. 1. Let url be the result of running the basic URL parser with pmi. 2. If url is failure, validate a standardized payment method identifier with pmi and return the result. 3. Otherwise, validate a URL-based payment method identifier passing url and return the result." Bug: 766805 Change-Id: I1b7dad94a90bd388751335bd95558ed812326ee3 Reviewed-on: https://chromium-review.googlesource.com/673276 Reviewed-by: Mathieu Perreault <mathp@chromium.org> Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org> Cr-Commit-Position: refs/heads/master@{#503164} [modify] https://crrev.com/0beaddc405726742b5545de252e6bf0a2d43edba/chrome/browser/ui/views/payments/payment_request_browsertest.cc [delete] https://crrev.com/fa9689106cb62897fd78094e0c36d89a833b49b8/third_party/WebKit/LayoutTests/external/wpt/payment-request/payment-request-ctor-pmi-handling.https-expected.txt [modify] https://crrev.com/0beaddc405726742b5545de252e6bf0a2d43edba/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
,
Sep 20 2017
> Did we not already do validation renderer side for PMI? No, our validation was all on the browser side.
,
Sep 20 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by ma...@chromium.org
, Sep 20 2017