Bug #12258
closedCopy key buttons only work in HTTPS mode
0%
Description
Yes of course everyone should be using HTTPS all the time especially now with ACME being available, but sometimes well for whatever $REASONS we still use HTTP.
I found out the hard way why this wasn't working after finally opening up my dev tools console to see it was erroring out. And then a bit of googling to find that `navigator.clipboard` is only available via HTTPS.
A little tweak would make this a bit friendlier, since that copy button sure is tempting-
pseudo-code:
```
if (location.protocol == 'https:') {
...show '(Copy)' button...
}
```
Updated by Adam Cooper about 3 years ago
Created PR 150 to resolve this.
Tested on local dev instance with HTTP only access and it fallsback, does a console warning and succeeds to copy the public keys.
https://github.com/theonemcdonald/pfSense-pkg-WireGuard/pull/150
Updated by Adam Cooper about 3 years ago
PR has been merged, this should be on the next release so ticket can be closed
Updated by Kris Phillips about 3 years ago
- Status changed from New to Pull Request Review
Updating status to Pull Request Review until changes are live.
Updated by Christian McDonald almost 3 years ago
- Status changed from Pull Request Review to Feedback
Updated by Danilo Zrenjanin almost 3 years ago
Tested against:
2.6.0-RC (amd64) built on Mon Jan 24 18:44:12 UTC 2022 FreeBSD 12.3-STABLE
The Copy button under VPN/WireGuard/Tunnels/Edit - Public key for this tunnel field works fine with HTTP GUI.
Still, there is another Copy button that fails while the GUI is running HTTP. It is under VPN/WireGuard/Peers/Edit - Optional pre-shared key for this tunnel.
Please check.
Updated by Danilo Zrenjanin about 2 years ago
- Status changed from Feedback to Resolved
Tested against:
22.05-RELEASE (amd64) built on Wed Jun 22 18:56:13 UTC 2022 FreeBSD 12.3-STABLE
It works fine. I am marking this ticket resolved.