You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenGist 1.7.2 via Ubuntu 23.10 containerised in Docker using the supplied docker-compose.yml.
Clicking copy gist button does not place text on the clipboard
Results in TypeError: undefined is not an object (evaluating 'navigator.clipboard.writeText') in JavaScript console.
Explanation
This will work correctly over eg https://gist.homelab:6157 or http:https://localhost but not eg http:https://192.168.1.100:6157 or http:https://gist.homelab:6157
The async clipboard API is a powerful web API, capable of both writing arbitrary data to the clipboard, as well as reading from the system clipboard. As such, there are serious security ramifications when allowing pages to write data to the clipboard
The API is limited to secure contexts, which means that navigator.clipboard is not present for http:https:// websites.
Workaround (Google Chrome)
Allow-list your particular URL in Google Chrome via chrome:https://flags/#unsafely-treat-insecure-origin-as-secure in the Insecure origins treated as secure field.
Access eg http:https://gist.homelab:6157 via Chrome
The text was updated successfully, but these errors were encountered:
Results in
TypeError: undefined is not an object (evaluating 'navigator.clipboard.writeText')
in JavaScript console.Explanation
This will work correctly over eg
https://gist.homelab:6157
orhttp:https://localhost
but not eghttp:https://192.168.1.100:6157
orhttp:https://gist.homelab:6157
See https://webkit.org/blog/10855/async-clipboard-api/ which states —
Workaround (Google Chrome)
chrome:https://flags/#unsafely-treat-insecure-origin-as-secure
in the Insecure origins treated as secure field.http:https://gist.homelab:6157
via ChromeThe text was updated successfully, but these errors were encountered: