|
1003 | 1003 | <li data-tests=
|
1004 | 1004 | "payment-request-show-method.https.html, show-method-postmessage-manual.https.html">
|
1005 | 1005 | If the [=relevant global object=] of [=request=] does not have
|
1006 |
| - [=transient activation=]: |
| 1006 | + [=transient activation=], the user agent MAY: |
1007 | 1007 | <ol>
|
1008 | 1008 | <li>Return [=a promise rejected with=] with a {{"SecurityError"}}
|
1009 | 1009 | {{DOMException}}.
|
1010 | 1010 | li>
|
1011 | 1011 | ol>
|
| 1012 | + <div class="note"> |
| 1013 | + <p> |
| 1014 | + This allows the user agent to not require user activation, for |
| 1015 | + example to support redirect flows where a user activation may |
| 1016 | + not be present upon redirect. See |
| 1017 | + <a href="#user-activation-requirement">a> for security |
| 1018 | + considerations. |
| 1019 | + p> |
| 1020 | + <p> |
| 1021 | + See also |
| 1022 | + <a href="https://github.com/w3c/payment-request/issues/1022"> |
| 1023 | + issue #1022a> for discussion around providing more guidance |
| 1024 | + in the specification on when user agents should or should not |
| 1025 | + require a user activation for {{PaymentRequest/show()}}. |
| 1026 | + p> |
| 1027 | + div> |
1012 | 1028 | li>
|
1013 |
| - <li data-tests="show-consume-activation.https.html">[=Consume user |
1014 |
| - activation=] of the [=relevant global object=]. |
| 1029 | + <li data-tests="show-consume-activation.https.html">Otherwise, |
| 1030 | + [=consume user activation=] of the [=relevant global object=]. |
1015 | 1031 | li>
|
1016 | 1032 | <li>Let |document| be |request|'s [=relevant global object=]'s
|
1017 | 1033 | [=associated `Document`=].
|
|
4492 | 4508 | opening multiple windows (tabs or pop-ups).
|
4493 | 4509 | p>
|
4494 | 4510 | section>
|
| 4511 | + <section> |
| 4512 | + <h2 id="user-activation-requirement"> |
| 4513 | + User activation requirement |
| 4514 | + h2> |
| 4515 | + <p> |
| 4516 | + If the user agent does not require user activation as part of the |
| 4517 | + {{PaymentRequest/show()}} method, some additional security mitigations |
| 4518 | + should be considered. Not requiring user activation increases the risk |
| 4519 | + of spam and click-jacking attacks, by allowing a Payment Request UI |
| 4520 | + to be initiated without the user interacting with the page immediately |
| 4521 | + beforehand. |
| 4522 | + p> |
| 4523 | + <p> |
| 4524 | + In order to mitigate spam, the user agent may decide to enforce a user |
| 4525 | + activation requirement after some threshold, for example after the |
| 4526 | + user has already been shown a Payment Request UI without a user |
| 4527 | + activation on the current page. In order to mitigate click-jacking |
| 4528 | + attacks, the user agent may implement a time threshold in which clicks |
| 4529 | + are ignored immediately after a dialog is shown. |
| 4530 | + p> |
| 4531 | + <p> |
| 4532 | + Another relevant mitigation exists in step 6 of |
| 4533 | + {{PaymentRequest/show()}}, where the document must be visible in order |
| 4534 | + to initiate the user interaction. |
| 4535 | + p> |
| 4536 | + section> |
4495 | 4537 | section>
|
4496 | 4538 | <section class="informative">
|
4497 | 4539 | <h2>
|
|
0 commit comments