Skip to content

Commit be6feef

Browse files
[Spec] Restore changes since REC (#1029)
As per the plan outlined in #1021#issuecomment-2107832273, we have now created the CR Snapshot and published a new CR Draft (https://www.w3.org/TR/payment-request/) that includes restoring the address changes. The only remaining work for that plan is to restore the previous changes that had been made since REC. Changes included: - [Spec] Relax user activation requirement for show() #1009 Additional edits on tops of above changes: - Add note linking to issue #1022 for discussion of user activation relaxing conditions Fixes #1025
1 parent 0a5afe2 commit be6feef

File tree

1 file changed

+45
-3
lines changed

1 file changed

+45
-3
lines changed

index.html

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,15 +1003,31 @@ <h2>
10031003
<li data-tests=
10041004
"payment-request-show-method.https.html, show-method-postmessage-manual.https.html">
10051005
If the [=relevant global object=] of [=request=] does not have
1006-
[=transient activation=]:
1006+
[=transient activation=], the user agent MAY:
10071007
<ol>
10081008
<li>Return [=a promise rejected with=] with a {{"SecurityError"}}
10091009
{{DOMException}}.
10101010
</li>
10111011
</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 #1022</a> 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>
10121028
</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=].
10151031
</li>
10161032
<li>Let |document| be |request|'s [=relevant global object=]'s
10171033
[=associated `Document`=].
@@ -4492,6 +4508,32 @@ <h2 id="canmakepayment-protections">
44924508
opening multiple windows (tabs or pop-ups).
44934509
</p>
44944510
</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>
44954537
</section>
44964538
<section class="informative">
44974539
<h2>

0 commit comments

Comments
 (0)