[Payment Handler] No cross-origin iframe install by default.
Before this patch, any iframe could install a Payment Handler by calling `paymentManager.instruments.set()`. This patch checks for the feature policy "payment" before allowing any operations on `paymentManager.instruments`. After this patch, a cross-origin iframe will reject all operations on `paymentManager.instruments` by default. The parent context can explicitly allow the iframe to use the Payment Handler API through feature policy. This can be accomplished via the iframe attribute `allow="payment"`, for example. Note that the same feature policy controls access to Payment Request API as well. Discussion: https://github.com/w3c/payment-handler/issues/281 Spec change: https://github.com/w3c/payment-handler/pull/282 Payment Handlers are behind a flag: chrome://flags/#service-worker-payment-apps Manual test: https://rsolomakhin.github.io/pr/apps/iframe/ Bug: 828948 Change-Id: I0259555692fa0b215d3700c233b3687724e665cb Reviewed-on: https://chromium-review.googlesource.com/1005275 Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org> Reviewed-by:Ganggui Tang <gogerald@chromium.org> Cr-Commit-Position: refs/heads/master@{#550629}
Showing
Please register or sign in to comment