Project

General

Profile

Actions

Bug #12258

open

Copy key buttons only work in HTTPS mode

Added by → luckman212 2 months ago. Updated 6 days ago.

Status:
New
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 6 days 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

Also available in: Atom PDF