@@ -822,15 +822,22 @@ <h2>
822
822
< li data-tests =
823
823
"payment-request-show-method.https.html, show-method-postmessage-manual.https.html ">
824
824
If the [=relevant global object=] of [=request=] does not have
825
- [=transient activation=]:
825
+ [=transient activation=], the user agent MAY :
826
826
< ol >
827
827
< li > Return [=a promise rejected with=] with a {{"SecurityError"}}
828
828
{{DOMException}}.
829
829
</ li >
830
830
</ 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 >
831
838
</ 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=].
834
841
</ li >
835
842
< li > Let |document| be |request|'s [=relevant global object=]'s
836
843
[=associated `Document`=].
@@ -3276,6 +3283,32 @@ <h2 id="canmakepayment-protections">
3276
3283
opening multiple windows (tabs or pop-ups).
3277
3284
</ p >
3278
3285
</ 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 >
3279
3312
</ section >
3280
3313
< section class ="informative ">
3281
3314
< h2 >
0 commit comments