-
Notifications
You must be signed in to change notification settings - Fork 41
Description
(Below I quote previous text from the Chrome team, moving it from this pull request [1] to an issue)
[1] w3c/webpayments#261
When a Payment Request is constructed, the Payment Handler specification requires the user-agent to fire a "canmakepayment" event1
to any matching installed Service Workers. The Service Worker is able to handle the event and return (via respondWith) either true or false.
To support native Android apps, Chrome also fires an IS_READY_TO_PAY intent to the matching installed native applications.
The "canmakepayment" event (and IS_READY_TO_PAY intent) currently conveys the following information to the Payment App:
topOrigin- e.g., https://merchant.example (browser-determined)paymentRequestOrigin- e.g., https://psp-iframe.example (browser-determined)methodData- a sequence of arbitrary method data (merchant-supplied)
The transfer of this information is invisible to the user and without consent (reminder that it happens on Payment Request construction, long before any UI might be shown). Because Payment Apps run in a 1p context, it could be used to track the user.
Proposed Mitigation
Remove the topOrigin, paymentRequestOrigin, and methodData fields from "canmakepayment" event. The payment app may still respond based on its own knowledge (e.g., checking 1p data for this user), but that knowledge is compressed into only one bit for the merchant to consume (true/false).
Footnotes
-
Not to be confused with the
canMakePayment()method of the Payment Request API. The "canmakepayment"event is fired at> construction time, not in response to acanMakePayment()call, and is used to answerhasEnrolledInstrument()` instead. ↩