From 240255b2ff00c8b416022e20df79651f7b9a3a95 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Tue, 24 Nov 2026 20:41:04 +0100 Subject: [PATCH] fix: the copy icons of the Manager are shown only on a page opened over HTTPS, where the browser offers the clipboard. --- CHANGELOG.md | 9 +++++++++ docs/remote-access.md | 5 +++-- docs/router.md | 8 +++++--- docs/service-accounts.md | 6 +++--- docs/sites.md | 4 ++-- web/src/ServerPanel.tsx | 17 +++++++++++------ web/src/WireGuardConfigDialog.tsx | 11 +++++++---- 7 files changed, 40 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50222a8..f4bf2ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.45.2 - 2026-11-24 20:41:04 +0100 + +fix: the copy icons of the Manager are shown only on a page opened over HTTPS, where the browser +offers the clipboard. + +- The copy icons of the Addresses panel, the Remote access page and the Web Sites page, and the Copy + button of a WireGuard configuration, are left out on a page opened over plain HTTP, where they + did nothing. + ## 0.45.1 - 2026-11-24 19:57:53 +0100 update: the development VM of lm-dev-vm.py keeps plain HTTP by name. diff --git a/docs/remote-access.md b/docs/remote-access.md index 50247b1..647e0ac 100644 --- a/docs/remote-access.md +++ b/docs/remote-access.md @@ -39,7 +39,8 @@ their password and, when enrolled, the code. - The eye opens the device's configuration; the download gives `-.conf`, with a placeholder for the device's private key, which the server never has. - The remove button removes a peer after a confirmation. -- **Server:** the server's public key with a copy icon, the endpoint and the allowed IPs a device - needs; **Show config** opens a device configuration with placeholders. +- **Server:** the server's public key with a copy icon on a page opened over HTTPS, the endpoint + and the allowed IPs a device needs; **Show config** opens a device configuration with + placeholders, with a Copy button over HTTPS. - In the configuration dialogs a switch leaves out the `[Interface]` and `PrivateKey` lines, which WireGuard for Windows fills in for a new empty tunnel. diff --git a/docs/router.md b/docs/router.md index 6aa838d..55d72b6 100644 --- a/docs/router.md +++ b/docs/router.md @@ -11,9 +11,11 @@ The Overview tab shows the state of the server, read every 10 seconds by default IKEv2, OpenVPN and WireGuard; and the status web service and its port. - **Services:** the state of each of the server's systemd services and of Caddy; the chip on the title bar tells whether the server's services are active. -- **Addresses:** links to the status page over HTTPS and over plain HTTP, and to the - Manager over HTTPS, each opening in a new tab; and the issuer and the discovery URL of the - server's OpenID Provider, each with a copy icon, or off while the provider is disabled (see +- **Addresses:** links to the status page and the Manager over HTTPS for the server's names (and + its addresses with `https.ip_sans`), and over plain HTTP: the status page by address, and both + by name and the Manager by address too while the redirect to HTTPS is off; each opens in a new + tab. Then the issuer and the discovery URL of the server's OpenID Provider, each with a copy + icon over HTTPS, or off while the provider is disabled (see [Service accounts](service-accounts.md#openid-provider)). - **Backup:** the result of the last run, the next run and Run now (see [Backup](backup.md)). - **PostgreSQL:** each cluster with its main settings and its databases with their sizes. diff --git a/docs/service-accounts.md b/docs/service-accounts.md index 8dc104c..7ec07d9 100644 --- a/docs/service-accounts.md +++ b/docs/service-accounts.md @@ -23,9 +23,9 @@ Collector reading the server's metrics. They cannot sign in to the Manager. ## OpenID Provider The server can sign its users in to other systems with OpenID Connect. Its issuer and discovery -URL are on the Addresses panel of the [Overview](router.md), each with a copy icon, and while it is -enabled the title of the list has the number of its clients. It is turned on on the server as -root: +URL are on the Addresses panel of the [Overview](router.md), each with a copy icon on a page +opened over HTTPS, and while it is enabled the title of the list has the number of its clients. +It is turned on on the server as root: ```sh linux-manager-config-edit set --restart oidc.enabled true diff --git a/docs/sites.md b/docs/sites.md index 1432700..1442493 100644 --- a/docs/sites.md +++ b/docs/sites.md @@ -8,8 +8,8 @@ and the name server of their domain on the [DNS](dns.md) page. - **State:** whether the sites are served. - **Largest upload:** the largest file or zip archive the Files tab and the server's API take. -- **WebDAV:** whether the folders are served over WebDAV, and its URL with a copy icon. WebDAV is - switched on the [System](system.md) tab, which installs rclone. +- **WebDAV:** whether the folders are served over WebDAV, and its URL with a copy icon over HTTPS. + WebDAV is switched on the [System](system.md) tab, which installs rclone. **Settings** edits the state, the largest upload and the WebDAV port. diff --git a/web/src/ServerPanel.tsx b/web/src/ServerPanel.tsx index acfb7dc..ac3a66b 100644 --- a/web/src/ServerPanel.tsx +++ b/web/src/ServerPanel.tsx @@ -404,16 +404,21 @@ export function Pairs(props: { rows: [string, string | ReactNode][] }) { ) } -/** A value in monospace for Pairs with an action icon that puts it on the clipboard; label names it in the tooltip. */ +/** + * A value in monospace for Pairs with an action icon that puts it on the clipboard, shown only on a page served over + * HTTPS, where the browser offers the clipboard; label names it in the tooltip. + */ export function Copyable(props: { value: string; label: string }) { return ( {props.value} - - void navigator.clipboard.writeText(props.value)}> - - - + {window.isSecureContext && ( + + void navigator.clipboard.writeText(props.value)}> + + + + )} ) } diff --git a/web/src/WireGuardConfigDialog.tsx b/web/src/WireGuardConfigDialog.tsx index 580793e..fc3ff9e 100644 --- a/web/src/WireGuardConfigDialog.tsx +++ b/web/src/WireGuardConfigDialog.tsx @@ -14,7 +14,8 @@ const PREFILLED_LINES = 2 * device's address, its peer's IPs, or a placeholder without them (ips null). The device's private key is a * placeholder, which the server never has; a switch leaves out the [Interface] and PrivateKey lines, which a client such * as WireGuard for Windows fills in for a new empty tunnel, and keeps its position in the browser's settings. Copy - * puts the configuration as shown on the clipboard. + * puts the configuration as shown on the clipboard; it is shown only on a page served over HTTPS, where the browser + * offers the clipboard. */ export default function WireGuardConfigDialog(props: { title: string; server: WireGuardServer; ips: string[] | null; onClose: () => void }) { const [copied, setCopied] = useState(false) @@ -43,9 +44,11 @@ export default function WireGuardConfigDialog(props: { title: string; server: Wi - + {window.isSecureContext && ( + + )}