Project

General

Profile

Actions

Bug #12258

open

Copy key buttons only work in HTTPS mode

Added by → luckman212 9 months ago. Updated 4 months ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
WireGuard
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:
All

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...
}
```

Actions #1

Updated by Adam Cooper 7 months 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

Actions #2

Updated by Adam Cooper 7 months ago

PR has been merged, this should be on the next release so ticket can be closed

Actions #3

Updated by Kris Phillips 7 months ago

  • Status changed from New to Pull Request Review

Updating status to Pull Request Review until changes are live.

Actions #4

Updated by Christian McDonald 5 months ago

  • Status changed from Pull Request Review to Feedback
Actions #5

Updated by Danilo Zrenjanin 4 months 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.

Actions

Also available in: Atom PDF