Skip to content

Commit d9352e2

Browse files
author
Nick Burris
authored
[Spec] Relax user activation requirement for show() (#1009)
This gives the user agent the ability to relax the user activation requirement on the PaymentRequest.show() method. This spec change largely follows the relevant change outlined in Secure Payment Confirmation: w3c/secure-payment-confirmation#236
1 parent 2ab32ae commit d9352e2

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

index.html

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -822,15 +822,22 @@

822822
<li data-tests=
823823
"payment-request-show-method.https.html, show-method-postmessage-manual.https.html">
824824
If the [=relevant global object=] of [=request=] does not have
825-
[=transient activation=]:
825+
[=transient activation=], the user agent MAY:
826826
<ol>
827827
<li>Return [=a promise rejected with=] with a {{"SecurityError"}}
828828
{{DOMException}}.
829829
li>
830830
ol>
831+
<p class="note">
832+
This allows the user agent to not require user activation, for
833+
example to support redirect flows where a user activation may not
834+
be present upon redirect. See
835+
<a href="#user-activation-requirement">a> for security
836+
considerations.
837+
p>
831838
li>
832-
<li data-tests="show-consume-activation.https.html">[=Consume user
833-
activation=] of the [=relevant global object=].
839+
<li data-tests="show-consume-activation.https.html">Otherwise,
840+
[=consume user activation=] of the [=relevant global object=].
834841
li>
835842
<li>Let |document| be |request|'s [=relevant global object=]'s
836843
[=associated `Document`=].
@@ -3276,6 +3283,32 @@

32763283
opening multiple windows (tabs or pop-ups).
32773284
p>
32783285
section>
3286+
<section>
3287+
<h2 id="user-activation-requirement">
3288+
User activation requirement
3289+
h2>
3290+
<p>
3291+
If the user agent does not require user activation as part of the
3292+
{{PaymentRequest/show()}} method, some additional security mitigations
3293+
should be considered. Not requiring user activation increases the risk
3294+
of spam and click-jacking attacks, by allowing a Payment Request UI
3295+
to be initiated without the user interacting with the page immediately
3296+
beforehand.
3297+
p>
3298+
<p>
3299+
In order to mitigate spam, the user agent may decide to enforce a user
3300+
activation requirement after some threshold, for example after the
3301+
user has already been shown a Payment Request UI without a user
3302+
activation on the current page. In order to mitigate click-jacking
3303+
attacks, the user agent may implement a time threshold in which clicks
3304+
are ignored immediately after a dialog is shown.
3305+
p>
3306+
<p>
3307+
Another relevant mitigation exists in step 6 of
3308+
{{PaymentRequest/show()}}, where the document must be visible in order
3309+
to initiate the user interaction.
3310+
p>
3311+
section>
32793312
section>
32803313
<section class="informative">
32813314
<h2>

0 commit comments

Comments
 (0)