From fa2e28626accffa66bd83ba3875d7b6ea0904a1d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sat, 12 Sep 2026 12:40:56 +0200 Subject: [PATCH 01/11] Prevent stability ping values from freezing on long tests (#851) * Initial plan * Clear stability ping resource timings Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Add CORS headers to route fulfillment in stability test Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> Co-authored-by: sstidl Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- stability_worker.js | 4 ++++ tests/e2e/stability.spec.js | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/stability_worker.js b/stability_worker.js index 0dd47b3..c51a40a 100644 --- a/stability_worker.js +++ b/stability_worker.js @@ -185,6 +185,10 @@ function doPing() { if (d > 0 && d < instspd) instspd = d; } catch (e) { // Performance API not available, use estimate + } finally { + try { + performance.clearResourceTimings(); + } catch (e) {} } } diff --git a/tests/e2e/stability.spec.js b/tests/e2e/stability.spec.js index e066efd..210f708 100644 --- a/tests/e2e/stability.spec.js +++ b/tests/e2e/stability.spec.js @@ -1,8 +1,11 @@ const fs = require("node:fs"); +const path = require("node:path"); const { test, expect } = require("@playwright/test"); const { baseUrls } = require("./helpers/env"); const { stabilityStartButton } = require("./helpers/ui"); +const workerSource = fs.readFileSync(path.join(__dirname, "..", "..", "stability_worker.js"), "utf8"); + async function setShortDuration(page) { await page.evaluate(() => { const select = document.querySelector("#durationSelect"); @@ -122,4 +125,40 @@ test.describe("Stability test", () => { await expect(page.locator("#serverArea")).toBeVisible({ timeout: 10_000 }); await expect(page.locator("#server option")).toContainText("Local dual backend", { timeout: 10_000 }); }); + + test("clears resource timings after measuring a ping", async ({ page }) => { + await page.goto(`${baseUrls.standalone}/stability.html`); + await page.route(`${baseUrls.backend}/empty.php?cors=true&r=*`, route => route.fulfill({ status: 200, headers: { "Access-Control-Allow-Origin": "*" }, body: "" })); + + await expect( + page.evaluate( + async ({ source, url }) => { + const instrumentedSource = ` + const clearResourceTimings = performance.clearResourceTimings.bind(performance); + performance.clearResourceTimings = () => { + postMessage("resource timings cleared"); + clearResourceTimings(); + }; + ${source} + `; + const worker = new Worker(URL.createObjectURL(new Blob([instrumentedSource], { type: "text/javascript" }))); + try { + await new Promise((resolve, reject) => { + const timeout = setTimeout(() => reject(new Error("Resource timings were not cleared")), 10_000); + worker.onmessage = event => { + if (event.data === "resource timings cleared") { + clearTimeout(timeout); + resolve(); + } + }; + worker.postMessage(`start ${JSON.stringify({ url_ping: url, duration: 1, mpot: true })}`); + }); + } finally { + worker.terminate(); + } + }, + { source: workerSource, url: `${baseUrls.backend}/empty.php` } + ) + ).resolves.toBeUndefined(); + }); }); From 0490f3e935621392cab9c8129ea905f21e751015 Mon Sep 17 00:00:00 2001 From: Stefan Stidl Date: Sat, 12 Sep 2026 12:46:36 +0200 Subject: [PATCH 02/11] chore(release): bump version to 6.3.0 --- doc.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- speedtest.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc.md b/doc.md index ddd1a73..63ec36e 100755 --- a/doc.md +++ b/doc.md @@ -1,7 +1,7 @@ # LibreSpeed > by Federico Dossena -> Version 6.2.1 +> Version 6.3.0 > [https://github.com/librespeed/speedtest/](https://github.com/librespeed/speedtest/) ## Introduction diff --git a/package-lock.json b/package-lock.json index d38852b..4c15539 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "librespeed-speedtest", - "version": "6.2.1", + "version": "6.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "librespeed-speedtest", - "version": "6.2.1", + "version": "6.3.0", "license": "LGPL-3.0-or-later", "devDependencies": { "@playwright/test": "^1.55.0", diff --git a/package.json b/package.json index 9437992..30d0faa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "librespeed-speedtest", - "version": "6.2.1", + "version": "6.3.0", "description": "LibreSpeed - A Free and Open Source speed test that you can host on your server(s)", "main": "speedtest.js", "scripts": { diff --git a/speedtest.js b/speedtest.js index d38152d..f536c37 100755 --- a/speedtest.js +++ b/speedtest.js @@ -49,7 +49,7 @@ function Speedtest() { this._settings = {}; //settings for the speed test worker this._state = 0; //0=adding settings, 1=adding servers, 2=server selection done, 3=test running, 4=done console.log( - "LibreSpeed by Federico Dossena v6.2.1 - https://github.com/librespeed/speedtest" + "LibreSpeed by Federico Dossena v6.3.0 - https://github.com/librespeed/speedtest" ); } From 678d8f6bf3a33a5e859c58418ba6e452deef1e74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Sep 2026 12:54:48 +0200 Subject: [PATCH 03/11] chore(deps-dev): bump js-yaml from 4.3.1 to 4.3.2 (#853) Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.3.1 to 4.3.2. - [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.2/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/4.3.1...4.3.2) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.3.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4c15539..20d6402 100644 --- a/package-lock.json +++ b/package-lock.json @@ -811,9 +811,9 @@ "license": "ISC" }, "node_modules/js-yaml": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", - "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "dev": true, "funding": [ { From 449e9962ed15c8242355360a957d793dd30ea469 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sat, 12 Sep 2026 15:35:39 +0200 Subject: [PATCH 04/11] Keep the modern mobile gauge row in view when a test starts (#854) * Initial plan * fix: keep mobile gauge visible on start Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * refactor: clarify mobile gauge scroll helper Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * fix: defer mobile gauge scroll until running render Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> --- frontend/javascript/index.js | 42 ++++++++++ tests/e2e/mobile-gauge-visibility.spec.js | 99 +++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 tests/e2e/mobile-gauge-visibility.spec.js diff --git a/frontend/javascript/index.js b/frontend/javascript/index.js index fcb7647..f1fe7d8 100644 --- a/frontend/javascript/index.js +++ b/frontend/javascript/index.js @@ -16,6 +16,8 @@ const testState = { state: INITIALIZING, speedtest: null, servers: [], + initialGaugeScrollPending: false, + initialGaugeScrollScheduled: false, selectedServerDirty: false, testData: null, testDataDirty: false, @@ -81,6 +83,7 @@ function startButtonClickHandler() { case READY: case FINISHED: testState.speedtest.start(); + testState.initialGaugeScrollPending = true; testState.state = RUNNING; return; case RUNNING: @@ -92,6 +95,30 @@ function startButtonClickHandler() { } } +/** + * Scroll the initial download gauge into view on narrow viewports when starting a test + */ +function scrollInitialDownloadGaugeIntoView() { + if (!window.matchMedia("(max-width: 800px)").matches) { + return; + } + + const downloadGauge = document.querySelector("#download-gauge"); + if (!downloadGauge) { + return; + } + + const { top, bottom } = downloadGauge.getBoundingClientRect(); + if (top >= 0 && bottom <= window.innerHeight) { + return; + } + + downloadGauge.scrollIntoView({ + block: "center", + inline: "nearest", + }); +} + /** * Event listener for clicks on the "Copy link" button in the modal */ @@ -349,6 +376,21 @@ function startRenderingLoop() { ) ); + if ( + testState.state === RUNNING && + testState.initialGaugeScrollPending && + !testState.initialGaugeScrollScheduled + ) { + testState.initialGaugeScrollScheduled = true; + requestAnimationFrame(() => { + if (testState.state === RUNNING) { + scrollInitialDownloadGaugeIntoView(); + } + testState.initialGaugeScrollPending = false; + testState.initialGaugeScrollScheduled = false; + }); + } + // Show ping and jitter if data is available pingAndJitter.forEach((e) => e.classList.toggle( diff --git a/tests/e2e/mobile-gauge-visibility.spec.js b/tests/e2e/mobile-gauge-visibility.spec.js new file mode 100644 index 0000000..817c182 --- /dev/null +++ b/tests/e2e/mobile-gauge-visibility.spec.js @@ -0,0 +1,99 @@ +const { test, expect } = require("@playwright/test"); +const { modernStartButton } = require("./helpers/ui"); + +test.use({ viewport: { width: 390, height: 560 } }); + +test.describe("Mobile gauge visibility", () => { + test("keeps the active gauge visible after pressing Start", async ({ page }) => { + await page.route("**/speedtest.js", async (route) => { + await route.fulfill({ + contentType: "text/javascript; charset=utf-8", + body: ` + class Speedtest { + constructor() { + this.selectedServer = null; + this.onupdate = null; + this.onend = null; + } + + start() { + this.onupdate?.({ + dlProgress: 0.1, + ulProgress: 0, + dlStatus: "123.45", + ulStatus: "0", + pingStatus: "10.5", + jitterStatus: "0.9", + testState: 1 + }); + } + + abort() { + this.onend?.(true); + } + + setParameter() {} + addTestPoints() {} + selectServer(callback) { + callback(this.selectedServer); + } + setSelectedServer(server) { + this.selectedServer = server; + } + getSelectedServer() { + return this.selectedServer; + } + } + + window.Speedtest = Speedtest; + `, + }); + }); + + await page.route("**/settings.json", async (route) => { + await route.fulfill({ + contentType: "application/json; charset=utf-8", + body: JSON.stringify({ telemetry_level: "off" }), + }); + }); + + await page.route("**/server-list.json", async (route) => { + await route.fulfill({ + contentType: "application/json; charset=utf-8", + body: JSON.stringify([ + { + name: "Test Server", + server: "http://127.0.0.1:18184/backend/", + }, + ]), + }); + }); + + await page.goto("http://127.0.0.1:18184/index-modern.html"); + + const startButton = modernStartButton(page); + const downloadGauge = page.locator("#download-gauge"); + + await expect(startButton).toHaveText("Let's start", { timeout: 10_000 }); + + await page.evaluate(() => window.scrollTo(0, 0)); + + const gaugeStartsBelowFold = await downloadGauge.evaluate((element) => { + const { top, bottom } = element.getBoundingClientRect(); + return bottom > window.innerHeight || top < 0; + }); + expect(gaugeStartsBelowFold).toBe(true); + + await startButton.click(); + await expect(startButton).toHaveText("Abort"); + + await expect + .poll(() => + downloadGauge.evaluate((element) => { + const { top, bottom } = element.getBoundingClientRect(); + return top >= 0 && bottom <= window.innerHeight; + }) + ) + .toBe(true); + }); +}); From be1e0a0daac3a386d7bc40daa9d4bfba696e9e2b Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sat, 12 Sep 2026 18:44:43 +0200 Subject: [PATCH 05/11] Fix mixed-content server selection (#855) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> --- speedtest.js | 6 +- tests/e2e/server-selection.spec.js | 113 +++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 tests/e2e/server-selection.spec.js diff --git a/speedtest.js b/speedtest.js index f536c37..5cff6b7 100755 --- a/speedtest.js +++ b/speedtest.js @@ -239,7 +239,11 @@ Speedtest.prototype = { const checkServer = function(server, done) { let i = 0; server.pingT = -1; - if (server.server.indexOf(location.protocol) == -1) done(); + if ( + location.protocol === "https:" && + server.server.substring(0, 7).toLowerCase() === "http://" + ) + done(); else { const nextPing = function() { if (i++ == PINGS) { diff --git a/tests/e2e/server-selection.spec.js b/tests/e2e/server-selection.spec.js new file mode 100644 index 0000000..3926288 --- /dev/null +++ b/tests/e2e/server-selection.spec.js @@ -0,0 +1,113 @@ +const { test, expect } = require('@playwright/test'); +const fs = require('node:fs'); +const path = require('node:path'); +const vm = require('node:vm'); + +const speedtestSource = fs.readFileSync( + path.resolve(__dirname, '../../speedtest.js'), + 'utf8' +); + +function createHarness(protocol, responders = {}) { + const requests = []; + + function FakeXMLHttpRequest() { + this.responseText = ''; + this.timeout = 0; + } + + FakeXMLHttpRequest.prototype.open = function open(method, url) { + this._method = method; + this._url = url; + }; + + FakeXMLHttpRequest.prototype.send = function send() { + requests.push(this._url); + const baseUrl = this._url.replace(/[?&]cors=true$/, ''); + const outcome = responders[baseUrl] || 'error'; + + if (outcome === 'success') { + if (typeof this.onload === 'function') { + this.onload(); + } + return; + } + + if (typeof this.onerror === 'function') { + this.onerror(new Error(`Request failed for ${baseUrl}`)); + } + }; + + const context = { + console: { log() {} }, + Date, + location: { protocol }, + navigator: { userAgent: 'Playwright' }, + performance: { getEntriesByName: () => [] }, + XMLHttpRequest: FakeXMLHttpRequest + }; + + vm.createContext(context); + vm.runInContext(speedtestSource, context, { filename: 'speedtest.js' }); + + return { Speedtest: context.Speedtest, requests }; +} + +function createServer(server) { + return { + name: server, + server, + dlURL: 'garbage.php', + ulURL: 'empty.php', + pingURL: 'empty.php', + getIpURL: 'getIP.php' + }; +} + +function selectServer(speedtest) { + return new Promise((resolve) => { + speedtest.selectServer(resolve); + }); +} + +test.describe('Speedtest server selection protocol handling', () => { + test('allows HTTPS backends to be pinged from an HTTP frontend', async () => { + const secureServer = 'https://secure.example/'; + const { Speedtest, requests } = createHarness('http:', { + [`${secureServer}empty.php`]: 'success' + }); + + const speedtest = new Speedtest(); + speedtest.addTestPoint(createServer(secureServer)); + + const selectedServer = await selectServer(speedtest); + + expect(selectedServer.server).toBe(secureServer); + expect( + requests.some((url) => url.startsWith(`${secureServer}empty.php`)) + ).toBeTruthy(); + }); + + test('still skips insecure HTTP backends from an HTTPS frontend', async () => { + const insecureServer = 'http://insecure.example/'; + const secureServer = 'https://secure.example/'; + const { Speedtest, requests } = createHarness('https:', { + [`${insecureServer}empty.php`]: 'success', + [`${secureServer}empty.php`]: 'success' + }); + + const speedtest = new Speedtest(); + speedtest.addTestPoint(createServer(insecureServer)); + speedtest.addTestPoint(createServer(secureServer)); + + const selectedServer = await selectServer(speedtest); + + expect(selectedServer.server).toBe(secureServer); + expect( + requests.some((url) => url.startsWith(`${insecureServer}empty.php`)) + ).toBeFalsy(); + expect( + requests.some((url) => url.startsWith(`${secureServer}empty.php`)) + ).toBeTruthy(); + }); +}); From aa84692df3f0de19021153ada69572335cff8547 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 27 Sep 2026 09:50:52 +0200 Subject: [PATCH 06/11] Make `USE_NEW_DESIGN` deterministic by cache-busting `config.json` in design switcher (#858) * Initial plan * Fix design switch config caching for USE_NEW_DESIGN Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> --- design-switch.js | 3 ++- tests/e2e/design-switch.spec.js | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/design-switch.js b/design-switch.js index 0a23475..4ea78c6 100644 --- a/design-switch.js +++ b/design-switch.js @@ -37,7 +37,8 @@ try { const xhr = new XMLHttpRequest(); // Use a synchronous request to prevent a flash of the old design before redirecting - xhr.open('GET', 'config.json', false); + // Bypass stale browser caches so Docker env changes are reflected immediately + xhr.open('GET', 'config.json?_=' + Date.now(), false); xhr.send(null); // Check for a successful response, but not 304 Not Modified, which can have an empty response body diff --git a/tests/e2e/design-switch.spec.js b/tests/e2e/design-switch.spec.js index c676215..8cb1ac8 100644 --- a/tests/e2e/design-switch.spec.js +++ b/tests/e2e/design-switch.spec.js @@ -26,4 +26,21 @@ test.describe('Design switch behavior', () => { await expect(page).toHaveURL(/index-classic\.html\?design=old/); await expect(classicStartButton(page)).toBeVisible(); }); + + test('config fetch bypasses browser cache', async ({ page }) => { + let configRequestUrl = ''; + + await page.route('**/config.json*', async (route) => { + configRequestUrl = route.request().url(); + await route.fulfill({ + status: 200, + contentType: 'application/json', + body: JSON.stringify({ useNewDesign: true }), + }); + }); + + await page.goto(`${baseUrls.standalone}/index.html`); + await expect(page).toHaveURL(/index-modern\.html/); + expect(configRequestUrl).toMatch(/config\.json\?_=\d+/); + }); }); From f7ebbbf2b0bfc8c502eaa98cc3d7e741ea1c6f1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 22:56:03 +0200 Subject: [PATCH 07/11] chore(deps-dev): bump brace-expansion from 1.1.16 to 1.1.21 (#865) Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.16 to 1.1.21. - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](https://github.com/juliangruber/brace-expansion/compare/v1.1.16...v1.1.21) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 1.1.21 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 20d6402..5757528 100644 --- a/package-lock.json +++ b/package-lock.json @@ -260,9 +260,9 @@ "license": "MIT" }, "node_modules/brace-expansion": { - "version": "1.1.16", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz", - "integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==", + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", "dev": true, "license": "MIT", "dependencies": { From 9ae2f9e22a0dbb941f234013fef6e284796f0429 Mon Sep 17 00:00:00 2001 From: Eduardo Garcia Date: Wed, 21 Oct 2026 18:04:38 -0300 Subject: [PATCH 08/11] Publish the image on demand after PHP security releases; turn off session upload progress (CVE-2026-109618/109619) (#867) * ci,docker: allow a manual image rebuild, and turn off session upload progress PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix CVE-2026-109618 and CVE-2026-109619, which allow unauthenticated remote code execution with Apache mod_php. The images are rebuilt on Sundays only, so a maintainer needs a way to publish a rebuild right after a base image security release: add workflow_dispatch to the Docker workflow. The second advisory also names the session upload progress feature as a way to reach the vulnerable path. LibreSpeed does not use it, so it is turned off in the image. * ci: always pull the base image when building A rebuild after a security release of the php or alpine image should not reuse a cached older base (the job uses cache-from type=gha). --- .github/workflows/docker-publish.yml | 6 ++++++ docker/librespeed-php.ini | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 152398a..7b0eb97 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -8,6 +8,9 @@ name: Docker on: schedule: - cron: '30 20 * * Sun' + # Lets a maintainer rebuild and publish the images right after a security release of the + # php or alpine base image (Actions > Docker > Run workflow), instead of waiting for Sunday. + workflow_dispatch: push: branches: ["*"] # Publish semver tags as releases. @@ -129,6 +132,9 @@ jobs: file: ${{ matrix.dockerfile }} platforms: linux/amd64,linux/arm64,linux/arm/v7 push: ${{ github.event_name != 'pull_request' }} + # Always fetch the base image again, so a rebuild after a security release of php or alpine + # does not reuse a cached older base + pull: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha diff --git a/docker/librespeed-php.ini b/docker/librespeed-php.ini index 6a25f2f..5c657d2 100644 --- a/docker/librespeed-php.ini +++ b/docker/librespeed-php.ini @@ -3,3 +3,9 @@ ; empty.php can send its headers. 32M leaves modest headroom. post_max_size = 32M + +; LibreSpeed does not use the session upload progress feature, and PHP's advisory +; for CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp) names it as a way to reach the +; vulnerable code path, recommending it be off if it is not needed. Updating PHP is +; the real fix; this only removes a feature nobody here uses. +session.upload_progress.enabled = 0 From a820d7cdf1fea13592809966ba845e68efff7ef9 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Oct 2026 23:53:05 +0200 Subject: [PATCH 09/11] chore(release): prepare v6.3.1 (#869) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> --- doc.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- speedtest.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc.md b/doc.md index 63ec36e..4550611 100755 --- a/doc.md +++ b/doc.md @@ -1,7 +1,7 @@ # LibreSpeed > by Federico Dossena -> Version 6.3.0 +> Version 6.3.1 > [https://github.com/librespeed/speedtest/](https://github.com/librespeed/speedtest/) ## Introduction diff --git a/package-lock.json b/package-lock.json index 5757528..8828973 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "librespeed-speedtest", - "version": "6.3.0", + "version": "6.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "librespeed-speedtest", - "version": "6.3.0", + "version": "6.3.1", "license": "LGPL-3.0-or-later", "devDependencies": { "@playwright/test": "^1.55.0", diff --git a/package.json b/package.json index 30d0faa..4ca46a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "librespeed-speedtest", - "version": "6.3.0", + "version": "6.3.1", "description": "LibreSpeed - A Free and Open Source speed test that you can host on your server(s)", "main": "speedtest.js", "scripts": { diff --git a/speedtest.js b/speedtest.js index 5cff6b7..2674fc0 100755 --- a/speedtest.js +++ b/speedtest.js @@ -49,7 +49,7 @@ function Speedtest() { this._settings = {}; //settings for the speed test worker this._state = 0; //0=adding settings, 1=adding servers, 2=server selection done, 3=test running, 4=done console.log( - "LibreSpeed by Federico Dossena v6.3.0 - https://github.com/librespeed/speedtest" + "LibreSpeed by Federico Dossena v6.3.1 - https://github.com/librespeed/speedtest" ); } From 4cf44ad6ac0618a201d5e2f14a9f30cbfcdab8cb Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Oct 2026 07:36:01 +0200 Subject: [PATCH 10/11] Point classic UI at mounted /servers.json in Docker entrypoint (#870) * Initial plan * Apply remaining changes Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Apply remaining changes Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Reuse SERVER_LIST_URL sed block for mounted servers.json Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Strengthen classic mounted server list E2E assertions --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> Co-authored-by: Stefan Stidl --- docker/entrypoint.sh | 2 ++ tests/e2e/classic-server-list.spec.js | 29 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 tests/e2e/classic-server-list.spec.js diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 8fe1987..36e8eae 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -91,6 +91,8 @@ if [[ "$MODE" == "frontend" || "$MODE" == "dual" || "$MODE" == "standalone" ]]; if [ -f /servers.json ]; then echo "using mounted /servers.json for server-list.json" cp /servers.json /var/www/html/server-list.json + # default the frontend list to the mounted file so the classic design uses it too + SERVER_LIST_URL="${SERVER_LIST_URL:-server-list.json}" elif [ -n "$SERVER_LIST_URL" ]; then echo "no /servers.json found, relying on SERVER_LIST_URL" elif [ "$MODE" == "frontend" ]; then diff --git a/tests/e2e/classic-server-list.spec.js b/tests/e2e/classic-server-list.spec.js new file mode 100644 index 0000000..17a097b --- /dev/null +++ b/tests/e2e/classic-server-list.spec.js @@ -0,0 +1,29 @@ +const { test, expect } = require("@playwright/test"); +const { baseUrls } = require("./helpers/env"); + +test.describe("Classic design with mounted server list", () => { + test("frontend classic page loads the mounted server-list.json", async ({ page, request }) => { + const html = await (await request.get(`${baseUrls.frontend}/index-classic.html`)).text(); + expect(html).toMatch(/var SPEEDTEST_SERVERS = "server-list\.json";/); + + const pageErrors = []; + page.on("pageerror", error => pageErrors.push(error.message)); + + // This fixture hostname only resolves inside Docker. Keep server selection + // deterministic without mocking the mounted server-list.json response. + await page.route("http://backend-testpoint:8080/empty.php*", route => + route.fulfill({ status: 200, headers: { "Access-Control-Allow-Origin": "*" }, body: "" }) + ); + + const listResponse = page.waitForResponse(response => response.url().endsWith("/server-list.json")); + await page.goto(`${baseUrls.frontend}/index-classic.html`); + + const response = await listResponse; + expect(response.ok()).toBeTruthy(); + + // Verify the fetched config was applied to the classic server selector. + await expect(page.locator("#server option")).toHaveText(["Backend testpoint"], { timeout: 10_000 }); + await expect(page.locator("#startStopBtn")).toBeVisible(); + expect(pageErrors).toEqual([]); + }); +}); From 06524abd22e4581fb38a32393b80f37beec05f34 Mon Sep 17 00:00:00 2001 From: W Scott Jasso <1896399+scottjasso@users.noreply.github.com> Date: Fri, 23 Oct 2026 10:28:21 -0700 Subject: [PATCH 11/11] Make the docker entrypoint use relative backend URL (#871) --- docker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 36e8eae..d480101 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -101,7 +101,7 @@ if [[ "$MODE" == "frontend" || "$MODE" == "dual" || "$MODE" == "standalone" ]]; else echo "no /servers.json found, create one for local host" # generate config for just the local server - echo '[{"name":"local","server":"/backend", "dlURL": "garbage.php", "ulURL": "empty.php", "pingURL": "empty.php", "getIpURL": "getIP.php", "sponsorName": "", "sponsorURL": "", "id":1 }]' > /var/www/html/server-list.json + echo '[{"name":"local","server":"backend", "dlURL": "garbage.php", "ulURL": "empty.php", "pingURL": "empty.php", "getIpURL": "getIP.php", "sponsorName": "", "sponsorURL": "", "id":1 }]' > /var/www/html/server-list.json fi if [ ! -z "$SERVER_LIST_URL" ]; then echo "using SERVER_LIST_URL for frontend server list"