Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add secure context criteria to pointerrawupdate and getCoalescedEvents #318

Merged
merged 2 commits into from
Apr 18, 2020

Conversation

NavidZ
Copy link
Member

@NavidZ NavidZ commented Mar 19, 2020

Add secure context criteria to pointerrawupdate event
and getCoalescedEvents APIs to reduce its exposure
to possible attacks.
closes #277


Preview | Diff

@NavidZ
Copy link
Member Author

NavidZ commented Mar 19, 2020

@domenic for the pointerrawupdate which is an event type of PointerEvent and is the only pointer event that is going to be restricted to a secure context is this enough to indicate its SecureContext restrictions? In other examples I saw in other specs all the events of a specific interface had this restriction and hence they added the [SecureContext] to the interface itself. But that doesn't work here.

@domenic
Copy link

domenic commented Mar 19, 2020

You also need to update whatever normative text fires a pointerrawupdate event to have it not do so when an appropiate global is not a secure context. Just hiding the event handler attribute wouldn't stop that spec text from executing and causing addEventListener("pointerrawupdate", callback) to trigger.

@domenic
Copy link

domenic commented Mar 19, 2020

It appears the section to update is https://w3c.github.io/pointerevents/#the-pointerrawupdate-event

@NavidZ
Copy link
Member Author

NavidZ commented Mar 19, 2020

Does this look good?

Copy link

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable, although the phrasing is a bit awkward. But within the existing structure of that section it should work.

@patrickhlauke patrickhlauke merged commit e153a2f into gh-pages Apr 18, 2020
@patrickhlauke patrickhlauke deleted the secure-context branch January 12, 2021 18:45
@smaug----
Copy link
Contributor

smaug---- commented Nov 23, 2022

@smaug---- smaug---- added needs-wpt Investigation whether the issue needs a wpt test has been done and wpt is missing and removed wpt labels Nov 23, 2022
@smaug----
Copy link
Contributor

Finally adding a test for this. Need to move quite a few tests to be loaded from .https and then have some tests for non-https to ensure the features aren't exposed.

@smaug---- smaug---- self-assigned this Oct 11, 2023
@smaug---- smaug---- removed the needs-wpt Investigation whether the issue needs a wpt test has been done and wpt is missing label Oct 16, 2023
@smaug----
Copy link
Contributor

@mustaqahmed
Copy link
Member

Thanks @smaug---- for fixing a bunch of WPTs around this.

This calls for new WPTs to be included in the Interop 2024 proposal (web-platform-tests/interop#472). Please consider voting for some of the WPTs you updated here (and maybe other WPTs too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit pointerrawupdate and getCoalescedEvents API to secure origins
5 participants