Project

General

Profile

Actions

Bug #12258

closed

Copy key buttons only work in HTTPS mode

Added by → luckman212 over 3 years ago. Updated over 2 years ago.

Status:
Resolved
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 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

Actions #2

Updated by Adam Cooper about 3 years ago

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

Actions #3

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.

Actions #4

Updated by Christian McDonald almost 3 years ago

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

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.

Actions #6

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

Actions

Also available in: Atom PDF