GiovanH / unofficial-homestuck-collection

An offline collection of Homestuck and its related works.
GNU General Public License v3.0
35 stars 4 forks source link

Unofficial Homestuck Collection does not support clipboard-read and clipboard-write attributes #347

Open EtchJetty opened 2 years ago

EtchJetty commented 2 years ago

It is impossible to give clipboard access to iframes. According to #https://github.com/w3c/webappsec-permissions-policy/issues/322#issuecomment-618009921 and this bug report, chrome versions 81-85 had broken iframe clipboard permissions. The feature policies clipboard-write and clipboard-allow were created to solve this issue, but the UHC seems to not recognize them. (The bug was fixed in Chrome 85, which was first used in Electron 10.0, a version newer than the UHC's Electron.)

To Reproduce Steps to reproduce the behavior:

  1. Make an iframe which includes a clipboard link. https://smart-flicker-baroness.glitch.me/ includes one.
  2. The same iframe that works in modern browsers (<iframe ... allow="clipboard-read; clipboard-write;">) will fail in the UHC2.

Expected behavior The parent window (the UHC) should recognize the policies and change behavior accordingly; this does not happen.

Screenshots

Screen Shot 2022-03-01 at 9 04 58 PM Screen Shot 2022-03-01 at 9 05 50 PM

Desktop (please complete the following information):

Additional context iframe is meant to be used for the "share" button in this project. The iframe is in use here, with security policies functioning as expected.

Here is a link to a mod file which includes the iframe within its template.

GiovanH commented 2 years ago

Test case https://mspfa.com/?s=45209&p=1

https://bugs.chromium.org/p/chromium/issues/detail?id=1074489 https://github.com/w3c/webappsec-permissions-policy/issues/322#issuecomment-618009921 https://github.com/HearthSim/twitch-hdt-frontend/issues/50#issuecomment-824773810 also potential here