-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Can't copy attachment link when accessing gitea not over HTTPS #26202
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
Comments
IIRC it has been fixed by "Re-allow clipboard copy on non-https sites #17118" It might be a regression of "Use clippie module to copy to clipboard #23801" @silverwind |
Sounds like a bug in https://github.com/silverwind/clippie, I will check. |
Actually it was not a bug in clippie in this case, but a bare use of |
silverwind
added a commit
that referenced
this issue
Jul 29, 2023
Fixes: #26202 Actually later I found out the code did not use `clippie`, so I fixed it. The bug was never in the clippie module like I initially suspected. Also, I added a tooltip for feedback. <img width="139" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/da501670-9c15-4412-969a-b559773c7ab9"> --------- Co-authored-by: Giteabot <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Uh oh!
There was an error while loading. Please reload this page.
Description
It's impossible to copy attachment link when accessing gitea over local network:
It tries to copy text using
navigator.clipboard.writeText(x)
butnavigator.clipboard
is available only when url is either HTTPS or localhost.There are workarounds for "insecure sources" such as
document.execCommand('copy')
.Or probably checking
window.isSecureContext
(which istrue
for both HTTPS and localhost) and showing a proper error message would be also fine.Gitea Version
1.20.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
Git Version
No response
Operating System
No response
How are you running Gitea?
Running file
gitea-1.20.1-windows-4.0-amd64.exe
Database
None
The text was updated successfully, but these errors were encountered: