Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

WebAPI updates for Firefox 82 #3731

Closed
chrisdavidmills opened this issue Sep 25, 2020 · 15 comments
Closed

WebAPI updates for Firefox 82 #3731

chrisdavidmills opened this issue Sep 25, 2020 · 15 comments
Assignees
Labels
Content:WebAPI For content triage purposes: This is related to WebAPI content Firefox 82

Comments

@chrisdavidmills
Copy link
Contributor

chrisdavidmills commented Sep 25, 2020

Acceptance criteria

The following bugs are dev-doc-complete, BCD is updated, an entry to Firefox release notes is added, experimental features page is updated, the content has been reviewed as needed.

    • [@hamishwillee] window.name can be used as an XSS attack vector — looks like a fairly simple update to cross-origin behavior of window.name; needs page updating to talk about it, maybe a small example, and a BCD update. Maybe also see if there is anywhere in our security pages that it would warrant a mention?
    • [@hamishwillee] Enable MediaSession API — this is documented already, so it looks like this mostly just needs BCD updates, plus you should also check that the documentation is complete.

Total estimate: 2 days

@chrisdavidmills chrisdavidmills added Content:WebAPI For content triage purposes: This is related to WebAPI content Firefox 82 labels Sep 25, 2020
@hamishwillee
Copy link
Collaborator

hamishwillee commented Oct 5, 2020

@chrisdavidmills This one ready for review.

@hamishwillee
Copy link
Collaborator

hamishwillee commented Oct 6, 2020

@chrisdavidmills This one ready for review.

@hamishwillee
Copy link
Collaborator

hamishwillee commented Oct 6, 2020

    • [@hamishwillee] window.name can be used as an XSS attack vector — looks like a fairly simple update to cross-origin behavior of window.name; needs page updating to talk about it, maybe a small example, and a BCD update. Maybe also see if there is anywhere in our security pages that it would warrant a mention?
      • Quick Review - 12 years of history on this one!
        • The problem is that window.name was shared among all pages loaded into the tab. This was providing:
          • an uncontrolled/risky mechanism mechanism for cross-domain sharing, which that was leveraged by some frameworks.
          • potential for a bad actor to get information that was stored by sites in window name "for convenience".
          • potential for a bad actor inject information into that value that might then be used by original origin.
        • The relevant change appears to that window.name is reset to an empty string when a tab opens content from another origin than the first page.
      • window.name - extended the note section with a clear note that the browser will reset the windows.name on cross-domain load. This also explains why, and the version that is first impacted.
      • Maybe also see if there is anywhere in our security pages that it would warrant a mention?
        • Decided not to. The logical place might be Web > Security in section on User information security or Data security with some general note "don't store important data where it might be visible to an untrusted page". But then the problem is now fixed - and without the problem the general suggestion isn't helpful

@chrisdavidmills This one is now ready for your review

@hamishwillee
Copy link
Collaborator

hamishwillee commented Oct 6, 2020

@chrisdavidmills
Copy link
Contributor Author

Thanks @hamishwillee. Looks like most of this has been done fine. I have made a few edits to the pages to tighten up the prose a bit, and made some suggestions on improving the BCD for the MediaSession API.

I think it'd be great if @Rumyra looked at the MediaSession docs and thought about if anything is missing, if it needs better examples, etc.

@hamishwillee
Copy link
Collaborator

@chrisdavidmills Thank you. FYI, have acted on your BCD suggestions for MediaSession API - waiting for review Thanks for tidying prose; I did various changes along the way too, but mostly "to my taste".

Agree, very pleased if @Rumyra look has a look too. @Rumyra note that the BCD for MediaPositionState has now been updated, but until that goes in you'll see the table missing in the docs.

@Rumyra
Copy link
Contributor

Rumyra commented Oct 14, 2020

Thanks both, I'll check out the MediaSession docs now

@chrisdavidmills
Copy link
Contributor Author

Cool, cheers @Rumyra , and thanks @hamishwillee for your continued work.

@Rumyra
Copy link
Contributor

Rumyra commented Oct 15, 2020

Just moved this back whilst I get some good code examples in

@Rumyra
Copy link
Contributor

Rumyra commented Oct 20, 2020

I've written a demo and added a pr to dom-examples for it...

I've updated all of the code examples within the API pages to be consistant and show the relevant code where appropriate.

The task for the future is to write up the demo as a tutorial (added as a task in web apis project), for which I have already made notes 👍

@chrisdavidmills
Copy link
Contributor Author

chrisdavidmills commented Oct 20, 2020

@Rumyra the demo is great, and works really nicely on Chrome and Firefox. The only thing I was wondering about is — isn't one of the main points of the Media Session API to provide meta data about tracks that can be easily shown in notifications? therefore, would it make sense to add some Notifications API code to the demo so that when a track changes, a system notification is shown to display details of the next track?

@chrisdavidmills
Copy link
Contributor Author

@Rumyra hi Ruth! I can't remember exactly what was said when we chatted about this, but I believe that we agree that the MediaSession docs were complete for their basic purpose, right? And that anything left, like adding a basic tutorial and figuring out a more advanced version with notifications or whatever could be left to an advanced tutorial?

In which case, shall we close this one, and then you can submit sprint issues for the tutorials?

@Rumyra
Copy link
Contributor

Rumyra commented Oct 30, 2020

Yes that's it :D I've added an issue to the Web APIs project, so once we've cleared the release issues I can go back and spend some more time making an explainer - see #3797

@chrisdavidmills
Copy link
Contributor Author

@Rumyra perfect, thanks!

@Rumyra
Copy link
Contributor

Rumyra commented Nov 4, 2020

Just moved this to 'done' as it's closed 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:WebAPI For content triage purposes: This is related to WebAPI content Firefox 82
Projects
None yet
Development

No branches or pull requests

3 participants