Skip to content

.pr_agent_accepted_suggestions

qodo-merge-bot edited this page Nov 29, 2026 · 179 revisions
                     PR 8585 (2026-11-29)                    
[correctness] Custom-config plugins lose linting
Custom-config plugins lose linting `checkPlugin` adds ESLint 9 as a default dependency before `syncEslintConfig` determines whether a customised legacy config can be migrated. When a plugin has a customised `.eslintrc.cjs`, no flat config and no existing ESLint dependency, autofix installs ESLint 9 but leaves only the legacy config, which the generated lint workflow cannot use.

[correctness] Plugin installs reject the stale lockfile
Plugin installs reject the stale lockfile `checkPlugin` migrates ep_provenance's stock ESLint config and raises its dependency requirements, but does not regenerate its existing `pnpm-lock.yaml`. That leaves the plugin's lockfile recording ESLint 8 and the old dependency specifiers, so its CI install fails before linting and its release workflow cannot proceed.

[correctness] Some migrated plugins cannot lint
Some migrated plugins cannot lint `syncEslintConfig` removes a stock legacy config when a flat config exists, but returns `wroteFlatConfig: false`, so `checkPlugin` does not raise an existing ESLint 8 dependency to version 9. For a plugin with both configs and ESLint 8, the removed legacy file was the configuration its `eslint .` command used; the subsequent dependency update preserves the ESLint 8 range.

[correctness] Custom lint rules are deleted
Custom lint rules are deleted `syncEslintConfig` deletes every `.eslintrc.*` file as soon as it finds a flat config, without applying its customised-config check. When a plugin has both kinds of config, autofix removes its customised legacy rules rather than warning that they may still need manual migration.


                     PR 8584 (2026-11-28)                    
[correctness] Default-tier test misses server default
Default-tier test misses server default The `overrides` object in `freshPad` hard-codes `updateCheck: true`, so the test titled 'default tier — the version-status request is still made' never sees the server's real default. It would still pass if the server stopped sending `updateCheck: true` for the default tier, and the title then describes behavior the test no longer checks. The server-side tier-to-clientVar mapping remains covered by `updateCheckClientVar.ts`, so this is a naming and coverage gap in the browser spec rather than an untested production path.


                     PR 8580 (2026-11-27)                    
[correctness] Disabled updates can keep being polled
Disabled updates can keep being polled `UpdatePage` gates its initial status fetch on `updatesTier`, but its separate in-flight polling effect still calls `refreshStatus()` without checking that tier. If the tier becomes `off` while an in-flight status remains cached, the page continues requesting `/admin/update/status` once per second even though the route is no longer registered.

[correctness] The disabled notice can disappear
The disabled notice can disappear `UpdatePage` sets `fetchState` to `disabled` when the tier turns off, but an earlier `refreshStatus()` can subsequently overwrite that state because the effect's cancellation flag does not guard its updates. When a status request is pending across a tier change, its response or failure can replace the notice with an error or cached status actions.

[correctness] Update banner and page stall without settings.json
Update banner and page stall without settings.json The admin settings socket’s `load` handler sends `flags.updatesTier` only after `fsp.readFile(settings.settingsFilename)` succeeds and returns without emitting flags when the read fails. When Etherpad runs on defaults without a settings file, the tier remains `null`, so `UpdateBanner` does not request status and `UpdatePage` remains on 'loading' even though the status route is available.


                     PR 8578 (2026-11-27)                    
[correctness] Invalid versions reach broken releases
Invalid versions reach broken releases `checkPlugin` now logs a warning for an invalid or missing `package.json` version instead of stopping before its `autopush` path. When that path makes other changes, it can push a plugin commit whose default-branch release then fails at the version-bump step.

[correctness] Malformed prereleases can be published
Malformed prereleases can be published The new version-bump regex accepts invalid prerelease identifiers such as the numeric identifier in `1.2.3-01`, then treats them as valid prereleases. A plugin with that version is rewritten to `1.2.3` and proceeds through tagging and publication rather than being rejected before a release is created.


                     PR 8572 (2026-11-26)                    
[correctness] Accounts accept an unintended password
Accounts accept an unintended password `passwordMatches` converts the configured password to UTF-8 before comparing it, which replaces a lone UTF-16 surrogate with the Unicode replacement character. If an account password contains an escaped lone surrogate such as `"\ud800"`, a caller can submit the distinct password `�` and pass authentication.


                     PR 8570 (2026-11-24)                    
[correctness] Embed tag can hide pref-change bugs
Embed tag can hide pref-change bugs The tagged pref-change test in cross_site_embed.spec.ts exercises the font-pref write, its in-memory fallback, and the CSS update, all inside a cross-site iframe, while the only untagged test loads the pad top-level and changes no pref. Similarly, the tagged same-site and cross-site embed tests in pad_socket_origin.spec.ts are the only checks that the pad socket keeps the visitor's author and accepts edits from a framed client on another origin. A plugin declaring `@feature:cross-origin-embed` in `disables` therefore skips both the pref-change regression coverage and the positive framed-author path that this spec file guards.


                     PR 8531 (2026-11-21)                    
[correctness] One-click installs can run unchecked code
One-click installs can run unchecked code `requestInstall` skips confirmation based on the catalog entry’s `official` value, but the install socket sends only the package name and the installer installs the current `latest` version. If a new version without qualifying provenance appears after the catalog was classified, an admin can click an Official entry and install that unchecked version.

[correctness] Plugin updates skip the safety warning
Plugin updates skip the safety warning `requestInstall` guards the Available-list button, but the installed-plugin update button still calls `installPlugin` directly. When an installed third-party plugin has an update, that button emits the same install event without showing the new confirmation dialog.

[correctness] Hidden plugins still reach catalog clients
Hidden plugins still reach catalog clients `hideUninstallablePlugins` returns classified entries without applying `pluginCatalogThirdParty`, and the new listing predicate is used only by `search`. An admin client requesting the existing `getAvailable` socket event therefore receives third-party entries in `hide` mode and placeholders in the default `label` mode.

[correctness] Official plugins show as third-party on slow refreshes
Official plugins show as third-party on slow refreshes `fetchPluginRegistryInfo` now runs a second, sequential attestation fetch per package inside the same 15 s `DEPRECATION_SWEEP_BUDGET_MS` signal and the same 8 workers, which roughly doubles the network time of a cold sweep. Any package not reached before the budget runs out (or whose attestation fetch is aborted) gets `official = false`. `hideUninstallablePlugins` stores that result in the `availablePlugins` cache for up to 10 minutes, so ether plugins show the Third-party badge and the confirmation dialog, and in `hide` mode they drop out of the catalog.

[correctness] Hide mode empties the catalog when npm is unreachable
Hide mode empties the catalog when npm is unreachable With `pluginCatalogThirdParty: 'hide'`, `isListedInCatalog` lists only entries with `official === true`, and `official` is true only when the provenance lookup succeeded. When the registry is blocked or times out, every entry is unknown and therefore hidden. That breaks the documented fail-open promise ("an admin behind a firewall gets the full catalog, not an empty one"), and no log or UI message says why the list is empty.

[correctness] Installed-plugin check now also downloads attestations
Installed-plugin check now also downloads attestations `fetchPluginDeprecations`, which `getInstalledPluginWarnings` uses on every `getInstalled` event, now wraps `fetchPluginRegistryInfo`. That function also fetches and parses the provenance attestation document for each installed plugin version, even though only `deprecated` is used. This adds one registry round trip per installed plugin on a cold cache, all inside the same 15 s budget, which delays the installed-plugins response for no benefit.


                     PR 8527 (2026-11-21)                    
[correctness] A mistyped origin removes frame protection
A mistyped origin removes frame protection `validSource()` accepts malformed sources such as `https://`, and `adminFrameHeaders()` treats any accepted entry as grounds to omit `X-Frame-Options`. If an operator mistypes an allowed origin, browsers that do not enforce CSP lose the fallback framing restriction even though the configured origin is unusable.

[correctness] Embedded admins cannot stay signed in
Embedded admins cannot stay signed in The embedding instructions identify `socketIo.allowedOrigins` but omit the required change from the default `cookie.sameSite` value of `Lax`. When the admin UI is framed on another site, the browser does not send its session cookie, so the documented origin and socket changes alone do not keep the admin authenticated.


                     PR 8526 (2026-11-21)                    
[correctness] Frontend checks fail on a clean checkout
Frontend checks fail on a clean checkout The new Playwright test navigates to `/views/login.html`, but the frontend-test workflow starts the server without building the OIDC pages served at that path. In a clean checkout, the generated page is absent, so the test cannot find the login form and fails before exercising the validation.

[correctness] Consent users see no rejection reason
Consent users see no rejection reason The invalid-state branch in `consent.ts` disables submission but never writes to the page's `#error` element. When the consent URL has a missing or malformed `state`, users see an inert form without the error feedback promised for rejected interactions.


                     PR 8524 (2026-11-20)                    
[correctness] Oversized reports count as server errors
Oversized reports count as server errors The new `maxFieldsSize` limit makes `form.parse(req)` reject oversized reports, but `/jserror` forwards that rejection to the generic error handler. An unauthenticated report over 100 KB therefore receives HTTP 500, emits an exception stack, and increments the `http500` metric instead of being classified as an oversized request.


                     PR 8517 (2026-11-20)                    
[correctness] Failed cleanup leaves temporary files unnoticed
Failed cleanup leaves temporary files unnoticed The new `.catch(() => {})` handlers discard errors from unlinking both `srcFile` and `destFile`. If either removal fails, the file remains on disk without a cleanup diagnostic; previously, the unlink error reached the export route’s error handler.


                     PR 8515 (2026-11-20)                    
[correctness] Startup erases fallback chat settings
Startup erases fallback chat settings `padcookie.init()` initializes from `readPrefs_()` rather than the new in-memory fallback, so its second call replaces preferences written after the first call with `{}` when cookies are blocked. During startup, `getParams()` writes `alwaysShowChat` or `chatAndUsers` preferences between those calls, and later view-option reads no longer see those values.

[correctness] Settings revert when cookie writes fail
Settings revert when cookie writes fail `writePrefs_()` updates the in-memory copy without checking whether `Cookies.set()` persisted it, while `getPrefs_()` always prefers any readable cookie. If an existing cookie remains readable but writes are silently rejected, changing a setting appears to succeed in memory but the next preference read returns the old value.


                     PR 8514 (2026-11-20)                    
[correctness] Firefox cannot reach the test pad hosts
Firefox cannot reach the test pad hosts `pad_socket_origin.spec.ts` maps its synthetic hostnames to loopback only through Chromium's `--host-resolver-rules` launch flag. The same spec runs in the Firefox CI project, where that flag does not provide the mapping, so the tests that navigate to those hostnames fail before exercising the socket behavior.

[correctness] A policy typo still admits pad sockets
A policy typo still admits pad sockets `padOriginMiddleware` recognizes only exact `"allow"` and `"reject"` values and treats every other configured value as the anonymous policy. Settings overrides are not checked against the new union at runtime, so a mistyped intended `"reject"` value silently lets foreign-origin sockets connect, albeit without their cookies.

[correctness] Path-scoped group cookies break joins
Path-scoped group cookies break joins `sendPadSocketToken` signs the cookies sent to `/pad-socket-token`, while `padOriginMiddleware` validates against cookies sent to the separate `/socket.io` path. An integrator's `sessionID` cookie scoped to `/socket.io` therefore produces a mismatched token; if Fetch Metadata is unavailable and a proxy rewrites `Host` without another origin fallback, the pad loses its group session or is rejected.

[correctness] Plugins still act on a cross-origin visitor's login
Plugins still act on a cross-origin visitor's login The new `credentialRequest`/`ambientCredentialsTrusted` gate strips the visitor's session and cookies only from core reads, but the `handleMessageSecurity`, `handleMessage`, `clientVars` and `userJoin` hooks still get the raw `socket`, and `socket.client.request.session.user` and the Cookie header on it are untouched. A plugin that grants write access or picks an identity from the login session (returning "permitOnce" in `handleMessageSecurity`, or reading `session.user` in `handleMessage`) still trusts the visitor's credentials on a socket the origin check put in "anonymous" mode, so the default policy does not protect deployments that use such plugins.


                     PR 8511 (2026-11-20)                    
[correctness] Admins lose sockets across server replicas
Admins lose sockets across server replicas `adminSocketToken()` signs tokens with a randomly generated process-local key, so a token issued by one replica fails validation on another. If a plain-HTTP deployment routes the token request and WebSocket handshake to different replicas behind a proxy that rewrites `Host`, neither Fetch Metadata nor the Host fallback admits the connection.

[correctness] Logged-out admins are told their origin is wrong
Logged-out admins are told their origin is wrong `onConnectError` maps every `origin_not_allowed` rejection to the "page is not on Etherpad's own origin" toast, and the server logs a warning telling the operator to edit `socketIo.allowedOrigins`. The token is only issued to an authenticated admin, so on a plain-http deployment behind a proxy that rewrites Host, a user with no session or an expired one fails steps 2–5 for that reason alone. They get the origin toast and log line instead of the usual `admin_auth_error` path, and the token fetch also waits out the 1 s authn-failure delay before every connect attempt.

[correctness] Plugin usage example relies on an unexported helper
Plugin usage example relies on an unexported helper The doc comment on `originCheckMiddleware` tells plugin authors to call `io.of('/my-admin-ns').use(sessionMiddleware).use(originCheckMiddleware)`, but `socketSessionMiddleware` in this module is not exported. A plugin that adds only `originCheckMiddleware` has no `socket.request.sessionID`, so `isValidAdminSocketToken` always returns false and the token path the admin UI depends on on plain-http deployments never works for that namespace.


                     PR 8501 (2026-11-17)                    
[correctness] Windows users without symlink rights fail tests
Windows users without symlink rights fail tests The new `before` hook calls `fs.symlinkSync(..., 'dir')` unconditionally, although creating a directory symlink on Windows requires symlink privileges or Developer Mode. On Windows machines without either, setup throws before `compressCSS()` runs, and the backend suite includes this test in both Windows jobs.


                     PR 8498 (2026-11-17)                    
[correctness] Custom rate limits silently stop applying
Custom rate limits silently stop applying `socketio()` now forwards only `duration` and `points` to the steady limiter, discarding other configured rate-limiter options such as `blockDuration`. Deployments that use those options retain them in `settings.commitRateLimiting`, but the new limiter construction no longer applies them.


                     PR 8497 (2026-11-17)                    
[correctness] New-pad reload is not covered by the added regression test
New-pad reload is not covered by the added regression test The added Playwright spec `admin_pads_listener_leak.spec.ts` checks only that Total pads decrements by one per deletion. It never counts `padLoad` requests after a pad is created, so a regression that sends duplicate padLoad requests on New Pad would pass unnoticed. The rule expects the coverage in `admin-spec/admin_pads_page.spec.ts`, but the PR adds a differently named file instead.

[correctness] Create-pad reload can use stale search filters
Create-pad reload can use stale search filters The `onCreatePad` handler closes over `searchParams` and emits `padLoad` with it, but the effect's dependency array is `[settingsSocket, pads]`, so the handler is not rebound when `searchParams` changes (search pattern, filter, sort, page). After the user changes the search or filter, a successful create reloads the list with the previous query until a later `pads` update re-runs the effect. The PR touches exactly this handler and effect, so the stale capture is part of the code it changes.


                     PR 8495 (2026-11-16)                    
[correctness] Retried edits can be applied twice
Retried edits can be applied twice `handleUserChanges` compares the unsplit `canonicalCs` with stored revisions when detecting retransmissions, but now stores a split version of `rebasedChangeset`. If a client retries a keep or delete operation that was split after its first submission, the representations differ and the retry proceeds through rebasing as a new edit.


                     PR 8461 (2026-11-07)                    
[correctness] A failing leave hook strands the socket with no pad
A failing leave hook strands the socket with no pad In the pad-move path, `handleMessage` leaves the old room and commits the target session before awaiting `notifyUserLeave`, which performs an author-color lookup and runs the `userLeave` plugin hook. If either rejects, the new join stops before `handleClientReady`, leaving the socket outside both rooms and without CLIENT_VARS; a slow hook also delays every pad switch.


                     PR 8458 (2026-11-07)                    
[correctness] Three race tests pass if requests drop
Three race tests pass if requests drop The new chat-history, changeset-history, and saved-revision tests assert only that the unauthorized pad is unaffected, not that the held request completes against its authorized pad. If those requests are rejected or silently dropped after the raced join, all three assertions still pass despite losing the operation this change is meant to preserve.


                     PR 8450 (2026-11-06)                    
[correctness] Old approvals can release the wrong tag
Old approvals can release the wrong tag `publish-stable` promotes the current contents of `latest/edge` rather than a revision tied to its own `publish-edge` job. If another tagged run publishes to edge while this run waits for environment approval, approving the older run releases the other tag's revision to stable without that tag's approval.


                     PR 8433 (2026-11-04)                    
[correctness] Security credits list advisories from earlier releases
Security credits list advisories from earlier releases The 'Thanks to our security reporters' list in the new 3.3.14 section is described as covering reports 'since mid-October', but it re-lists GHSA advisories already credited in the 3.3.3, 3.3.9, 3.3.11 and 3.3.12 entries (for example GHSA-35rj-7vrx-29wq for sun1024, GHSA-746x-9w89-7xv6 for MaBeFHDW, GHSA-g9xm-3pqr-wcph for baeseungwon1010, GHSA-mc8w-wjhw-45x5 for gcm-explo1t, GHSA-pp5v-mvwg-76mp for meifukun). Those advisories were published and fixed in earlier releases, so the section mis-states its time window and repeats credits that were already given. Because this is the public release note that goes out with the release, the wrong window and duplicate credits will be published as-is.


                     PR 8425 (2026-11-03)                    
[correctness] Unrelated log edits bypass update checks
Unrelated log edits bypass update checks `isPorcelainClean` treats every path below `var/log/` as updater-owned instead of limiting the exemption to the update log. Any unrelated tracked or untracked file in that directory is therefore ignored during both HTTP and scheduler preflight checks, allowing Apply to proceed despite a dirty working tree.

Issue description

The clean-tree filter ignores the entire var/log/ directory, although the updater writes only its own update log there. Unrelated files under that directory can therefore bypass the working-tree preflight check.

Fix Focus Areas

  • src/node/updater/preflight.ts[58-67]

Recommended Fix

Restrict the updater-owned log path to the specific updater log file, such as var/log/update.log, and update the corresponding ignore configuration and tests so unrelated files under var/log/ remain detectable.


[correctness] Acknowledge can clear state during a crash-loop rollback
Acknowledge can clear state during a crash-loop rollback `stalePending` treats `!isVerificationArmed()` as proof that `pending-verification` is stale, but the `bootCount > 2` crash-loop path also returns `armed: false` after starting `performRollback` without awaiting it. If an admin acknowledges before rollback finishes its checkout and install, the route writes `idle` with `bootCount: 0`, allowing a subsequent Apply whose checkout and install can run concurrently because rollback does not hold `var/update.lock`.

Issue description

The acknowledge route treats pending-verification as stale whenever isVerificationArmed() is false. On the crash-loop path (bootCount > 2), rollback is still running despite an armed: false result, so acknowledgement can reset the state to idle and permit a concurrent Apply.

Fix Focus Areas

  • src/node/updater/RollbackHandler.ts[160-204]
  • src/node/updater/index.ts[46-52]
  • src/node/hooks/express/updateActions.ts[353-365]

Recommended Fix

Track boot rollback activity separately from the health-check timer, for example with a rollingBack flag in CheckResult or a module-level flag set when fireRollback is invoked. Expose a function such as isBootVerificationActive() that covers both an armed timer and an in-progress boot rollback, and allow acknowledgement of pending-verification only when neither is active. Alternatively, persist a non-acknowledgeable rolling-back status before performRollback starts mutating files.


[correctness] Version check can still overwrite a concurrent transition
Version check can still overwrite a concurrent transition `performCheck` re-reads state after `checkLatestRelease` but saves the entire snapshot, including `execution` and `bootCount`, after awaiting SMTP sends. If `markVerified`, Apply, or Acknowledge persists an execution transition during that wait, the later polling save can replace it with the older status, including restoring `pending-verification` after acknowledgement set `idle`.

Issue description

An in-flight version check can overwrite an execution transition persisted while it awaits SMTP delivery because performCheck later saves an older full-state snapshot.

Fix Focus Areas

  • src/node/updater/index.ts[133-238]
  • src/node/hooks/express/updateActions.ts[360-365]
  • src/node/updater/state.ts[160-174]

Recommended Fix

Serialize the state read-modify-write operation with acknowledgement. Immediately before polling saves, re-load the latest persisted state and merge only the fields performCheck owns (lastCheckAt, latest, lastEtag, and email). Write execution only if the scheduler decision changed it and the fresh execution status still matches the status that decision used; do not write bootCount from the snapshot. Add a test that pauses polling after its read, lets acknowledgement complete, and verifies that polling does not restore the earlier execution status.



                     PR 8423 (2026-11-03)                    
[correctness] Pre-registered shutdown handlers run twice
Pre-registered shutdown handlers run twice `takeOverSignal` adds `listener` unconditionally, then skips every matching entry in `process.listeners(signal)`, leaving duplicate registrations if that function was already subscribed. When the same handler is registered before takeover, one signal invokes it twice instead of once, unlike the previous remove-all-then-add behavior.

Issue description

If the target handler is already registered, takeOverSignal adds a second copy and preserves both, so one signal invokes it twice.

Fix Focus Areas

  • src/node/utils/takeOverSignal.ts[19-22]
  • src/tests/backend-new/specs/takeOverSignal.test.ts[15-27]

Recommended Fix

Keep the add-before-remove ordering so the signal handle never closes, but remove duplicate registrations of the target handler until exactly one remains. Add a test that registers the target handler before takeover and verifies both the final listener count and single invocation.



                     PR 8420 (2026-11-02)                    
[correctness] Rejected imports leave uploads on disk
Rejected imports leave uploads on disk `doImport()` rethrows a creator-mismatch error before removing the uploaded `srcFile`. When an authorized user uploads a `.etherpad` file with a different revision-zero creator, the request returns `permission` while the temporary file remains on disk; repeated rejected uploads accumulate there.

Issue description

Creator-mismatch rejections exit the import handler without deleting the uploaded temporary file.

Fix Focus Areas

  • src/node/handler/ImportHandler.ts[221-226]
  • src/node/handler/ImportHandler.ts[320-346]

Recommended Fix

Ensure the uploaded source file is removed when setPadRaw() rejects the import, preferably by placing upload cleanup in a finally path that also covers other failures and successful direct-database imports. Preserve the permission response.



                     PR 8410 (2026-11-01)                    
[correctness] Playback speed text is cut off
Playback speed text is cut off The new `text-overflow: ellipsis` is applied to the `.nice-select` wrapper while the selected label is rendered inside its separate `.current` span. When flexbox shrinks the control below the label's natural width, the wrapper clips that span without rendering an ellipsis, leaving users with an abruptly truncated playback-speed value.


                     PR 8409 (2026-10-31)                    
[correctness] The race test can pass without the catch-up
The race test can pass without the catch-up `join()` resolves when it receives `CLIENT_VARS`, but `handleClientReady()` performs the catch-up afterward, so the 300 ms sleep does not establish that the joining handler reached the raced operation. If catch-up takes longer on a loaded runner, the test releases the writer first and can pass even with the original all-socket behavior.


                     PR 8397 (2026-10-28)                    
[correctness] The return button can reopen the timeslider
The return button can reopen the timeslider `getReturnToPadUrl` accepts any same-origin pathname containing `/p/`, including `/p/testpad/timeslider?embed=1`, rather than checking for the current pad page. If that URL is the referrer, the return command follows it unchanged instead of navigating to `/p/testpad`; same-origin export routes also pass the check.

Issue description

The referrer check accepts same-origin timeslider and export URLs as pad pages, so Return to pad can navigate somewhere other than the current pad.

Fix Focus Areas

  • src/static/js/timesliderReturnUrl.ts[12-24]
  • src/tests/backend-new/specs/timesliderReturnUrl.test.ts[8-35]

Recommended Fix

Derive the current pad pathname from the timeslider URL and follow a referrer only when its origin and pathname match that pad page, accounting for any supported trailing slash. Preserve legitimate pad-page query strings, and add tests rejecting same-origin timeslider, export, and unrelated-pad referrers.



                     PR 8389 (2026-10-25)                    
[correctness] Latest snapshots include later chat
Latest snapshots include later chat `getPadRaw` enters the new chat-clamping branch only when `revNum < padHead`, although a supplied revision equal to the head is still a revision-specific export. If chat arrives after the last edit without another revision, exporting that revision carries the later messages and leaves `chatHead` unchanged.

Issue description

A supplied revision equal to the pad head bypasses chat clamping, so chat posted after that revision remains in the export.

Fix Focus Areas

  • src/node/utils/ExportEtherpad.ts[36-49]
  • src/tests/backend/specs/ExportEtherpad.ts[108-126]

Recommended Fix

Apply the chat boundary whenever a valid revision is explicitly supplied, including the current head, while keeping exports without a revision unbounded. Add a test with chat posted after the last revision.


[correctness] Earlier chat disappears from snapshots
Earlier chat disappears from snapshots `getPadRaw` stops scanning at the first chat record whose supplied timestamp is later than the bound revision. API callers can submit a future-dated message followed by an ordinary message before that revision; the latter has a qualifying timestamp but is excluded because chat indexes follow append order rather than timestamp order.

Issue description

A caller-supplied chat timestamp can make the first post-bound-timestamp record appear before qualifying records in chat-index order, causing the export loop to stop too soon.

Fix Focus Areas

  • src/node/utils/ExportEtherpad.ts[39-49]
  • src/node/db/API.ts[405-420]
  • src/node/db/Pad.ts[627-638]

Recommended Fix

Base revision-bounded selection on a recorded posting-order boundary rather than assuming supplied chat timestamps increase with indexes. Add a test with an API-provided future timestamp followed by an earlier-timestamped message.


[correctness] Large chats slow bounded exports
Large chats slow bounded exports `getPadRaw` now awaits one database read per chat record before the timestamp cutoff, then fetches the included records again during serialization. For a revision preceded by a large chat history, these serialized round trips add latency to an export whose existing record-fetching path otherwise buffers concurrent reads.

Issue description

Finding the chat cutoff adds a sequential database read for every preceding message, followed by another read of each included message.

Fix Focus Areas

  • src/node/utils/ExportEtherpad.ts[43-49]
  • src/node/utils/ExportEtherpad.ts[74-85]

Recommended Fix

Use a persisted chat boundary if available, or determine the boundary with bounded concurrent reads and reuse fetched messages during serialization. Preserve posting-order selection and verify behavior on pads with long chat histories.



                     PR 8388 (2026-10-23)                    
[correctness] Exports create permanent authors on denial
Exports create permanent authors on denial `checkAccess()` generates a fresh token and maps it to a persistent author before checking whether a group pad is private or can be created. A token-less export request for an inaccessible group pad reaches that mapping and leaves author records behind even though access is denied; repeated requests generate new records because the export route does not issue a token cookie.

Issue description

Token-less export requests can create persistent authors even when group-pad access is denied. Each such HTTP request gets a new token, so repeated requests grow the author database.

Fix Focus Areas

  • src/node/db/SecurityManager.ts[126-154]
  • src/node/hooks/express/importexport.ts[38-61]
  • src/node/db/AuthorManager.ts[112-128]

Recommended Fix

Perform all pad-access denial checks before allocating an author. Avoid allocating an author for read-only HTTP access checks that do not use an author ID, while preserving a distinct author for authorized token-less imports and socket sessions.


[correctness] Token-less requests bypass plugin handling
Token-less requests bypass plugin handling `checkAccess()` replaces a missing token before `getAuthorId()` passes it to the author-mapping hooks as `context.token`. For token-less HTTP requests, plugins that handle a nullish token under the documented hook contract instead receive a generated token and no longer take their missing-token path.

Issue description

Generating a token before invoking the author-mapping hook changes its documented input for token-less requests, so plugins cannot identify those requests through context.token.

Fix Focus Areas

  • src/node/db/SecurityManager.ts[126-132]
  • src/node/db/AuthorManager.ts[145-154]
  • doc/api/hooks_server-side.md[219-238]

Recommended Fix

Keep the original missing-token value available to author-mapping hooks while supplying a distinct generated database key for core's fallback mapping. Ensure the change cannot restore a shared null author.



                     PR 8359 (2026-10-18)                    
[correctness] Releases fail after the app is enabled
Releases fail after the app is enabled The app-token step requests access to `etherpad` but not `etherpad-lite`, which is the repository the first checkout uses. Once `RELEASE_APP_ID` is set, that checkout prefers the app token over the PAT, so it cannot authenticate and the release never reaches its tag pushes.

Issue description

The app token excludes the repository checked out and pushed by the release job.

Fix Focus Areas

  • .github/workflows/release.yml[33-43]

Recommended Fix

Request etherpad-lite instead of etherpad in the token step's repository list, and ensure the release app is installed on ether/etherpad-lite with write access.



                     PR 8326 (2026-10-10)                    
[correctness] Restricted viewers are promised editing
Restricted viewers are promised editing `pad.share.readonly-explanation` says anyone with the editable link can edit, but the link does not override per-user restrictions. When authentication is required, `userCanModify()` rejects read-only users and users without modification authorization even if they open that URL.

Issue description

The Share dialog promises that anyone with the editable link can edit, even though authenticated users may have read-only access.

Fix Focus Areas

  • src/locales/en.json[368-368]

Recommended Fix

Revise the explanation to say the editable link remains usable for people who have permission to edit, while retaining the distinction between selecting a link and changing pad permissions.



                     PR 8325 (2026-10-09)                    
[correctness] Failed boots can leave test volumes behind
Failed boots can leave test volumes behind The `finally` block calls the asserting `docker()` wrapper for `docker stop` before attempting either resource removal. If startup fails or the container exits before becoming healthy and that stop returns a nonzero status, cleanup replaces the startup failure with a stop error and skips removal of both the container and its volume.

Issue description

A failed docker stop during test cleanup throws before the test can remove its container or volume, and can mask the original startup failure.

Fix Focus Areas

  • src/tests/container/readonly-root.mjs[104-110]
  • src/tests/container/readonly-root.mjs[10-16]

Recommended Fix

Make cleanup tolerate a container that is already stopped, and attempt container and volume removal independently even if stopping or removing the container fails. Preserve the original test failure while reporting any cleanup failure.



                     PR 8319 (2026-10-07)                    
[correctness] Creators cannot retrieve hidden tokens
Creators cannot retrieve hidden tokens `showDeletionTokenModalIfPresent()` returns before displaying the issued token, and the pad settings panel has no control to reveal or copy it. When `suppressPadDeletionTokenModal` is enabled, the creator receives the plaintext token only on first arrival; later visits receive `null`, leaving a creator who did not capture it unable to use token-based deletion from another device.

Issue description

Suppressing the modal leaves creators without a settings-based way to obtain the deletion token. The server issues its plaintext value only once and stores only a hash.

Fix Focus Areas

  • src/static/js/pad.ts[262-296]
  • src/templates/pad.html[397-440]
  • src/node/db/PadDeletionManager.ts[32-41]

Recommended Fix

Add an on-demand reveal or copy action in pad settings, with a secure creator-authorized way to obtain a usable token after the initial arrival. Verify that the suppressed modal stays hidden and the settings action works on a later visit.


[correctness] Readers see corrupted release notes
Readers see corrupted release notes The `CHANGELOG.md` edit replaces existing punctuation and symbols with mojibake such as `ŌĆö` and `ŌĆ”`. The corruption extends across historical release entries, including security notes, making those records harder to read and search.

Issue description

The PR corrupts existing changelog characters across historical release notes, replacing punctuation and symbols with mojibake.

Fix Focus Areas

  • CHANGELOG.md[7-12]
  • CHANGELOG.md[493-496]

Recommended Fix

Restore the pre-existing changelog text with its original UTF-8 characters, retaining only the new pad-deletion entry.



                     PR 8302 (2026-10-05)                    
[correctness] Negative list starts reset to one
Negative list starts reset to one The new `/^\d+$/` check in `attribsToClasses` drops a `start` value such as `-2`, although `domline.appendSpan` can parse that value and emit it as an ordered-list start attribute. When a pad's attribute pool contains a signed list start, the rendered list loses its stored starting position and uses the default numbering.

Issue description

The new start-value validation discards negative integers that the renderer previously supported, changing numbered-list display for pads containing those values.

Fix Focus Areas

  • src/static/js/linestylefilter.ts[93-95]
  • src/static/js/domline.ts[130-145]

Recommended Fix

Accept an optional leading minus sign while still rejecting whitespace and nonnumeric characters, and add a rendering test for a negative start.


[correctness] Security tests miss removed pool checks
Security tests miss removed pool checks The `start` and `list` injection tests use an attribute-bearing `tag:` payload that the separate `domline` check rejects even if both attribute-pool filters are removed. If either filter regresses while the tag-name check remains, both tests still pass despite pool values again being able to forge class tokens such as `tag:b`.

Issue description

The attribute-pool regression tests pass without the filtering they are intended to protect because a separate tag-name check blocks their payload.

Fix Focus Areas

  • src/tests/backend/specs/domline_class_token_injection.ts[22-22]
  • src/tests/backend/specs/domline_class_token_injection.ts[51-65]

Recommended Fix

Add list and start cases that attempt to forge a valid bare token such as tag:b, and assert that it does not create the corresponding element.



                     PR 8273 (2026-09-25)                    
[correctness] Users cannot open the copied value
Users cannot open the copied value `handleTransferOfSession` writes the bare UUID in `transferData.id` to the clipboard while the localized controls still call it a link that should be opened. After successful creation, users who follow that instruction receive no usable destination URL, and the surrounding text also describes the transferred author identity and preferences as a full session.

Issue description

The successful transfer flow copies a bare UUID, but the interface describes it as an openable link and calls the limited author identity and preferences payload a full session.

Fix Focus Areas

  • src/locales/en.json[225-232]
  • src/templates/index.html[188-205]
  • src/static/js/welcome.ts[98-106]

Recommended Fix

Rename the copy controls and instructions to describe a transfer code, tell users to paste it into the receiving interface's Code field, and clarify that the operation transfers the Etherpad author identity/token and client preferences rather than a full browser or login session. Update corresponding localized strings, or alternatively generate and copy a valid destination URL containing the transfer code.


[correctness] Closing settings loses transfer codes
Closing settings loses transfer codes `handleTransferOfSession` captures `copyLinkSection` and the error element before awaiting the creation request, while dialog closure replaces those nodes. If the dialog is closed while the request is pending, the server-created ID is rendered into the detached section and is unavailable when the user reopens settings.

Issue description

Closing the settings dialog while transfer creation is pending replaces the DOM nodes captured by the request handler, so a successful transfer ID is applied to detached controls and cannot be copied.

Fix Focus Areas

  • src/static/js/welcome.ts[57-117]
  • src/static/js/welcome.ts[152-169]

Recommended Fix

Preserve the completed transfer result independently of dialog nodes and re-query the current dialog controls after each await before rendering success or failure. Ensure the current copy section receives the generated ID handler even when the dialog was closed and rebuilt during the request.


[correctness] Old failures replace newer feedback
Old failures replace newer feedback `redeemTransferCode` disables the button while awaiting a request, but the input handler immediately re-enables it whenever a newly entered code is valid. If another redemption is started before the first completes, either failure can subsequently overwrite the newer request's error and button state.

Issue description

Editing the field to another valid code during an active redemption re-enables the button, allowing overlapping requests whose completion handlers update the same error and button controls without checking request identity.

Fix Focus Areas

  • src/static/js/welcome.ts[122-150]
  • src/static/js/welcome.ts[186-205]

Recommended Fix

Track whether a redemption is pending and keep the button disabled during that request regardless of input validity. Clear the pending state on failure, then derive the button state from the current input; alternatively cancel or generation-tag superseded requests and ignore their completions.



                     PR 8250 (2026-09-20)                    
[correctness] Older clients install deprecated plugins
Older clients install deprecated plugins `install` normalizes npm's `deprecated` field but only logs the resulting message before continuing to `linkInstaller.installPlugin()`. A stale admin page or older client can therefore submit a package that the refreshed catalog would hide, and the server still installs it.

Issue description

The server-side install path only warns when npm marks a plugin deprecated, so stale or older admin clients can bypass the catalog filter and install it.

Fix Focus Areas

  • src/static/js/pluginfw/installer.ts[265-272]

Recommended Fix

When normalizeDeprecation(meta?.deprecated) returns a message, reject the admin installation before calling linkInstaller.installPlugin(). Preserve any separate explicit command-line override outside this admin request path.


[performance] Opening the catalog floods npm
Opening the catalog floods npm `getAvailablePlugins()` starts `hideUninstallablePlugins()` independently for every concurrent cache miss, while `fetchPluginDeprecations()` caches only completed lookups and does not share in-flight work. The admin page emits `getInstalled` and `search` together on initial load, so both paths can sweep the entire catalog before either populates the cache, duplicating roughly one request per listed plugin and increasing page latency and npm load.

Issue description

Concurrent initial catalog requests independently fetch npm metadata for every plugin because neither getAvailablePlugins() nor the deprecation cache shares in-flight work. Opening the admin plugin page therefore creates duplicate full-catalog npm request bursts.

Fix Focus Areas

  • src/static/js/pluginfw/installer.ts[190-254]
  • src/static/js/pluginfw/installer.ts[283-310]
  • admin/src/pages/HomePage.tsx[79-128]

Recommended Fix

Add a shared in-flight promise for catalog loading or per-name@version lookup promises, and have concurrent callers await that work. Clear the in-flight state in finally so failed requests can be retried while completed deprecation results continue using the existing TTL cache.


[correctness] Installed plugins keep obsolete warnings
Installed plugins keep obsolete warnings The `getInstalled` handler mutates package objects retained in `pluginDefs.plugins` and assigns `plugin.deprecated` only when the latest warning map contains a truthy entry, without clearing transient status fields first. When npm removes a deprecation, a lookup fails, or catalog checks are disabled after a successful check, later socket responses reuse the retained value and the admin UI renders the obsolete badge.

Issue description

getInstalled writes transient warning and update fields onto package objects retained by pluginDefs.plugins, but does not remove them when a warning disappears, a lookup fails, or catalog checking is disabled. Ensure every installed-plugin response starts without stale deprecated or updatable values while preserving the package metadata required by the UI.

Fix Focus Areas

  • src/node/hooks/express/adminplugins.ts[55-74]

Recommended Fix

Clone each package while constructing the installed array and apply current deprecated and updatable values only to those response-local objects. Alternatively, explicitly delete or reset both transient fields before applying the latest check results; in either case, ensure the catalog-disabled path also emits objects without stale status fields.



                     PR 8249 (2026-09-20)                    
[correctness] Important font styles are lost in PDFs
Important font styles are lost in PDFs `parseFontFamily()` uses a non-global match for only the first `font-family` declaration and retains any trailing `!important` token, producing lookup keys such as `serif !important` instead of applying CSS declaration order and priority. Repeated or prioritized declarations can therefore resolve a different family than CSS specifies or miss both built-in and operator-configured families, causing the native PDF renderer to inherit the surrounding font.

Issue description

The inline-style parser selects only the first font-family declaration and retains a trailing !important annotation during normalization. As a result, repeated or prioritized declarations can select the wrong PDF font or fail exact lookup for built-in and configured families.

Fix Focus Areas

  • src/node/utils/ExportPdfNative.ts[139-149]
  • src/node/utils/ExportPdfNative.ts[483-492]

Recommended Fix

Parse every font-family declaration, remove a trailing case-insensitive !important token before splitting and normalizing family candidates, and choose the last declaration at the highest applicable priority. Add coverage for repeated declarations, earlier and later !important declarations, and prioritized built-in and configured families.


[reliability] Updated font files stay stale in PDFs
Updated font files stay stale in PDFs `readFontFile` caches both font buffers and failed reads forever using only the absolute filename, without invalidating that cache when settings are reloaded. If an operator replaces a font or fixes a missing file at the same path through the live settings workflow, later exports keep using the old bytes or fallback until Etherpad is restarted.

Issue description

Process-wide font-file caching survives production settings reloads, leaving corrected or replaced files at an unchanged path invisible to PDF exports.

Fix Focus Areas

  • src/node/utils/ExportPdfNative.ts[193-227]
  • src/node/utils/Settings.ts[1203-1210]
  • src/node/hooks/express/adminsettings.ts[486-490]

Recommended Fix

Invalidate cached font buffers whenever the font configuration is rebuilt, or key entries by file metadata and retry cached failures after changes. Ensure the production settings-reload path triggers invalidation, and test replacing or creating a font at the same configured path without restarting the process.



                     PR 8240 (2026-09-17)                    
[correctness] Plugin lines lose paragraph navigation
Plugin lines lose paragraph navigation `writeHTML` treats every nonempty `preHtml` or `postHtml` value as a semantic block wrapper and consequently omits `role="paragraph"`. When a line-attribute plugin surrounds content with non-semantic inline or styling markup, that line is omitted from paragraph navigation even though no heading or list semantics replace it.

Issue description

hasBlockWrapper currently assumes any hook-provided preHtml or postHtml string supplies block semantics. The hook contract permits arbitrary wrapper HTML, so inline or styling wrappers can incorrectly suppress the line's paragraph role.

Fix Focus Areas

  • src/static/js/domline.ts[89-135]
  • src/static/js/domline.ts[221-242]
  • doc/api/hooks_client-side.adoc[15-57]

Recommended Fix

Suppress role="paragraph" only when the rendered line has a known semantic block wrapper, such as a list, heading, preformatted block, or an explicitly declared semantic wrapper. Preserve the paragraph role for inline, styling-only, empty, or otherwise non-semantic hook wrappers, and add tests covering both semantic and inline plugin wrappers.



                     PR 8239 (2026-09-17)                    
[correctness] Valid closing braces disappear
Valid closing braces disappear `EnvPill` decodes a raw `\u007d` default into `}` and then the added `sanitize(decoded)` call removes that character before rebuilding the placeholder. This silently corrupts valid environment defaults containing escaped closing braces, even though the backend placeholder parser permits braces within its greedily captured default.

Issue description

Decoding JSON escapes turns \u007d into a closing brace, after which EnvPill removes it from the default. The frontend placeholder matcher must also continue recognizing the reconstructed placeholder when a decoded default contains a brace.

Fix Focus Areas

  • admin/src/components/settings/widgets/EnvPill.tsx[69-76]
  • admin/src/components/settings/envPill.ts[12-20]

Recommended Fix

Stop stripping closing braces from decoded defaults and update the frontend placeholder matcher to capture defaults through the final placeholder terminator, consistent with the backend parser. Add a round-trip test for an environment default containing \u007d.


[correctness] Rejected defaults remain visibly unsaved
Rejected defaults remain visibly unsaved `EnvPill` keeps the draft after `unescapeFromInput()` rejects an invalid or incomplete escape, while the new callback deliberately suppresses the parent update. When the user blurs the field after typing a trailing backslash or `\q`, the displayed value therefore disagrees with the unchanged settings JSON and can mislead them into saving a value that was never applied.

Issue description

EnvPill retains invalid or incomplete escaped text after blur even though that text was not propagated to the settings state. The field can therefore display a value different from what will be saved.

Fix Focus Areas

  • admin/src/components/settings/widgets/EnvPill.tsx[67-76]

Recommended Fix

Track whether the draft decodes successfully, expose rejection through aria-invalid, and reset the draft to the latest canonical initial value on blur, matching StringInput's behavior.



                     PR 8237 (2026-09-17)                    
[correctness] Encoded recent pads survive deletion
Encoded recent pads survive deletion `forgetRecentPad()` compares each raw stored `p.name` only with the decoded URL name and canonical pad ID. When an older entry contains URL encoding such as `notes%26ideas`, deleting `notes&ideas` removes any newer decoded entry but leaves the encoded entry available on the welcome screen.

Issue description

Legacy recentPads entries may contain URL-encoded names, but deletion compares their raw names against decoded identifiers. This leaves a supported legacy entry visible after its pad is deleted.

Fix Focus Areas

  • src/static/js/pad.ts[302-314]
  • src/static/skins/colibris/index.js[73-81]

Recommended Fix

Normalize each non-null stored pad name before comparison, using the same guarded decodeURIComponent behavior as the welcome screen. Remove an entry when either its raw or normalized name matches padName or pad.getPadId(), while preserving safe handling for malformed percent encoding.



                     PR 8230 (2026-09-16)                    
[correctness] Imported authors lose diff colors
Imported authors lose diff colors `isValidColorId()` accepts every non-negative integer and digit-only string without checking whether it indexes the configured palette. When an import supplies an out-of-range value such as `999`, color resolution preserves that value and the new export allowlist omits its CSS rule instead of replacing it with a usable palette color.

Issue description

Imported numeric color identifiers are accepted without palette bounds checking, so out-of-range values survive validation and later produce no author-color rule.

Fix Focus Areas

  • src/node/utils/ImportEtherpad.ts[35-37]
  • src/node/utils/ImportEtherpad.ts[266-270]

Recommended Fix

Parse numeric color identifiers and accept them only when they are integers from zero through authorManager.getColorPalette().length - 1; continue accepting supported hexadecimal colors. Replace all other values through the existing fallback and add tests for out-of-range numbers and numeric strings.



                     PR 8179 (2026-08-30)                    
[correctness] Italian macro remains unfixed
Italian macro remains unfixed The new validation records Italian's `plurale` macro as unsupported and then requires an empty failure list, so this test fails while the translation that freezes Italian-configured pads remains in the corpus. Replace `plurale`/`uno`/`altro` with the supported `plural`/`one`/`other` syntax so the test passes and the runtime loop is removed.

Issue description

The new locale validation detects the existing Italian plurale macro and fails, but the PR does not correct the translation responsible for the Italian pad freeze.

Issue Context

The runtime supports plural with CLDR option names. Update Italian's pad.userlist.onlineCount from plurale(count) uno: ... altro: ... to plural(count) one: ... other: ..., preserving the Italian display text.

Fix Focus Areas

  • src/locales/it.json[398-398]
  • src/tests/backend-new/specs/locale-files.test.ts[26-39]

[correctness] Malformed macros evade validation
Malformed macros evade validation The validation loop only checks strings that fully match `macroRe`, so malformed macro candidates are silently skipped; existing Hungarian and Unicode locale entries pass this test even though the runtime cannot expand them and displays the raw `{[...]}` markup. This prevents the test from enforcing its stated guarantee that the locale corpus contains no unsupported macros.

Issue description

The locale validator only inspects complete macroRe matches, allowing malformed or runtime-unsupported {[...]} expressions to pass unnoticed.

Issue Context

The runtime uses similarly restrictive syntax and leaves unmatched macro text in the rendered translation. Scan for every macro candidate, validate that the entire candidate conforms to supported syntax, and report malformed candidates; update currently invalid locale entries so the strengthened test passes.

Fix Focus Areas

  • src/tests/backend-new/specs/locale-files.test.ts[13-39]
  • src/locales/hu.json[161-161]
  • src/locales/diq.json[162-162]
  • src/locales/shn.json[109-109]
  • src/locales/my.json[152-152]


                     PR 8154 (2026-08-23)                    
[security] Percent-whitespace URL bypass
Percent-whitespace URL bypass `canonicalizeUrl()` strips C0/space before `decodeURIComponent()`, so percent-encoded whitespace/control (for example `%20http://…`) is reintroduced after decoding and can cause `isRemoteUrl()` / `isSafeNavUrl()` to misclassify an absolute or dangerous-scheme URL as “no scheme”, letting it survive sanitization.

Issue description

canonicalizeUrl() removes URL_IGNORED_RE characters before percent-decoding, but percent-decoding can reintroduce those characters (e.g. %20, %09, %0a). This can under-classify URLs as non-absolute / safe.

Issue Context

The sanitizer relies on canonicalizeUrl() for both subresource URL detection (isRemoteUrl / escapesBase) and navigational URL scheme filtering (isSafeNavUrl). If canonicalizeUrl() returns a value that starts with a decoded whitespace/control character, SCHEME_RE won’t match and the URL can be incorrectly allowed.

Fix Focus Areas

  • src/node/utils/ExportSanitizeHtml.ts[186-207]

Suggested change

Restructure canonicalization so ignored chars are stripped after entity decoding and percent-decoding (or strip both before and after). For example:

  • const entityDecoded = decodeHTML(raw);
  • const pctDecoded = try decodeURIComponent(entityDecoded) else entityDecoded;
  • return pctDecoded.replace(URL_IGNORED_RE, ''); Add a unit case like <img src="%20http://evil.example/a.png"> and <a href="%20javascript:alert(1)">x</a> to ensure they are treated the same as their literal-whitespace equivalents.

[security] Escaped CSS url() bypass
Escaped CSS url() bypass `sanitizeCssText()` only removes literal `@import` and `url(` patterns, so CSS-escaped or comment-split forms (e.g. `\75 rl(` or `u/**/rl(`) can survive inside `` blocks and still resolve to fetchable URLs when parsed by downstream CSS consumers.

Issue description

sanitizeCssText() is intended to prevent CSS-triggered fetches via url() and @import in <style> elements, but it only matches literal spellings. CSS escapes (backslash hex escapes) and comment splitting can encode these tokens in ways that most CSS parsers normalize back to url() / @import.

Issue Context

  • CSS_FETCH_RE explicitly accounts for CSS escapes (backslash) for style="..." attributes, but <style> content uses sanitizeCssText() which does not.
  • <style> text is passed through sanitizeCssText() via the parser’s ontext handler when inStyle is true.

Fix Focus Areas

  • src/node/utils/ExportSanitizeHtml.ts[257-274]
  • src/node/utils/ExportSanitizeHtml.ts[338-341]

Suggested change

Make <style> sanitization robust against CSS escapes/comments. Options (in increasing complexity):

  1. Conservative: if the <style> text contains any backslash (\\) or /*, drop the entire <style> block (or strip those constructs) since core’s preserved export CSS shouldn’t need them.
  2. Preprocess CSS by removing comments and normalizing CSS escapes before applying the @import/url() filters.
  3. Use a CSS parser/tokenizer to reliably find @import and url() tokens and rewrite/drop them. Add regression tests such as:
  • <style>body{background:\\75 rl(http://evil.example/a.png)}</style>
  • <style>body{background:u/**/rl(http://evil.example/a.png)}</style> ensuring evil.example does not survive.


                     PR 8112 (2026-08-07)                    
[reliability] Browser-only getHomeUrl default
Browser-only getHomeUrl default `getHomeUrl()` defaults `fromHref` to `window.location.href`, so calling `getHomeUrl()` without an argument in a non-browser runtime will throw `ReferenceError: window is not defined`. This is a latent reliability/maintainability footgun now that the helper is imported from backend tests and could be reused elsewhere; it is safe as long as non-browser callers always pass `fromHref`.

Issue description

getHomeUrl() uses window.location.href as a default parameter value. That makes getHomeUrl() crash if it is ever invoked without an argument in a non-browser environment (Node, server-side rendering, some test environments).

Issue Context

This helper is now imported by Node-run backend tests, which increases the chance of it being reused outside the browser in the future.

Fix Focus Areas

  • src/static/js/getHomeUrl.ts[11-12]

Suggested fix

Make the default safe by guarding access to window, for example:

  • Change the signature to require fromHref (no default) and keep browser call sites passing window.location.href, or
  • Keep an optional parameter but implement a guarded default:
  • const href = fromHref ?? (typeof window !== 'undefined' ? window.location.href : '');
  • If href is empty, throw a clear error message (or return '/' depending on desired semantics). This preserves the current browser behavior while preventing surprising crashes in non-browser callers.


                     PR 8089 (2026-08-04)                    
[reliability] Premature token deletion
Premature token deletion transferDeletionToken() deletes the source pad's deletionToken record before movePad attempts pad.remove(), so a pad.remove() failure can leave the source pad still present but without its original deletion token. This regresses movePad's failure-mode behavior by potentially stranding creators who rely on the saved token to delete the original pad.

Issue description

transferDeletionToken() removes the source deletion-token record (pad:<src>:deletionToken) before pad.remove() runs. If pad.remove() rejects (it executes multiple DB operations in parallel via Promise.all()), the source pad may remain (fully or partially) but its token is already gone.

Issue Context

  • API.movePad() does: copy() → transferDeletionToken() → remove().
  • Pad.remove() performs many removals concurrently; any failure rejects the whole operation.

Fix Focus Areas

  • Adjust token transfer so the source token is not deleted until the move is definitively complete.
  • Prefer relying on Pad.remove() to delete the source token on success, or implement rollback/restore if the move fails after token manipulation.

Fix Focus Areas (code refs)

  • src/node/db/PadDeletionManager.ts[53-63]
  • src/node/db/API.ts[766-775]
  • src/node/db/Pad.ts[819-878]

[reliability] Source token removed early
Source token removed early PadDeletionManager.transferDeletionToken() deletes the source pad’s deletionToken before API.movePad() calls pad.remove(); if pad.remove() fails (or the process crashes) after the transfer, the source pad can remain but its saved token is already gone. This strands token-based deletion for the surviving source pad even though Pad.remove() already handles token cleanup on successful completion.

Issue description

transferDeletionToken() currently removes the source pad’s deletion token immediately after writing the destination token. Because API.movePad() invokes this before pad.remove(), any failure after the transfer but before successful completion of pad.remove() can leave the source pad still present but without its deletion token.

Issue Context

Pad.remove() already calls padDeletionManager.removeDeletionToken(padID) as part of the pad deletion flow, so removing the source token inside transferDeletionToken() is redundant on success but harmful on partial failure.

Fix Focus Areas

  • src/node/db/PadDeletionManager.ts[47-66]
  • src/node/db/API.ts[754-776]

Suggested change

  • In transferDeletionToken(src, dst), keep the set(dstKey, stored) but do not remove srcKey there; rely on pad.remove() to remove the source token when the move completes.
  • If you still want eager cleanup, only remove the source token after pad.remove() succeeds (or implement rollback on failure).

[reliability] Source token removed early
Source token removed early PadDeletionManager.transferDeletionToken() deletes the source pad’s deletionToken before API.movePad() calls pad.remove(); if pad.remove() fails (or the process crashes) after the transfer, the source pad can remain but its saved token is already gone. This strands token-based deletion for the surviving source pad even though Pad.remove() already handles token cleanup on successful completion.

Issue description

transferDeletionToken() currently removes the source pad’s deletion token immediately after writing the destination token. Because API.movePad() invokes this before pad.remove(), any failure after the transfer but before successful completion of pad.remove() can leave the source pad still present but without its deletion token.

Issue Context

Pad.remove() already calls padDeletionManager.removeDeletionToken(padID) as part of the pad deletion flow, so removing the source token inside transferDeletionToken() is redundant on success but harmful on partial failure.

Fix Focus Areas

  • src/node/db/PadDeletionManager.ts[47-66]
  • src/node/db/API.ts[754-776]

Suggested change

  • In transferDeletionToken(src, dst), keep the set(dstKey, stored) but do not remove srcKey there; rely on pad.remove() to remove the source token when the move completes.
  • If you still want eager cleanup, only remove the source token after pad.remove() succeeds (or implement rollback on failure).


                     PR 8074 (2026-07-25)                    
[security] Reauth skips session rotation
Reauth skips session rotation `checkAccess()` only regenerates the session when `wasAlreadyAuthenticated` is false, but Step 3 explicitly supports reauthentication with different credentials, so an authenticated session can change identity/privilege without rotating the session id. This can leave a session-fixation window across a privilege upgrade (for example, non-admin session upgrading to admin via `/admin-auth/`).

Issue description

webaccess.checkAccess() currently skips req.session.regenerate() for any request that already has req.session.user before authentication runs. This fails to rotate the session id when a request reauthenticates into a different user or elevated privileges (e.g., non-admin -> admin), which is still an authentication boundary that should invalidate any attacker-known/planted session id.

Issue Context

Step 3 explicitly supports reauthentication with different credentials. /admin-auth/ is documented as a route that can establish an admin session cookie.

Fix Focus Areas

  • src/node/hooks/express/webaccess.ts[177-244]

Implementation notes

  • Capture a snapshot of the pre-auth identity/privilege before running the authenticate logic (e.g., preUsername, preIsAdmin).
  • After authentication, compare with the post-auth identity/privilege (postUsername, postIsAdmin).
  • Regenerate when:
  • there was no authenticated user before (preUsername == null), or
  • the authenticated identity changed (preUsername !== postUsername), or
  • privilege materially increased (at minimum preIsAdmin === false && postIsAdmin === true).
  • Keep the existing error handling (500 on regeneration failure) consistent with your security posture.

[security] No rotation on privilege-upgrade
No rotation on privilege-upgrade checkAccess only regenerates when the request started with no req.session.user, but Step 3 explicitly supports re-authentication with different credentials, so an already-authenticated session that upgrades identity/privileges (e.g. non-admin → admin for /admin-auth) will keep the same session id. This leaves a session fixation window across an authentication/privilege boundary that the PR intends to protect.

Issue description

checkAccess() skips session id rotation whenever req.session.user was already set at the start of Step 3. However, Step 3 is documented/implemented to allow re-authentication with different credentials, which can change the authenticated principal or upgrade privileges (for example, non-admin→admin on /admin-auth). In those cases, keeping the old session id defeats the session fixation protection across the privilege boundary.

Issue Context

  • Step 2 can fail for an already-authenticated non-admin user attempting to access an admin-only resource.
  • Step 3 then authenticates again and can replace/upgrade req.session.user.
  • Current logic only rotates when the pre-Step-3 session had no user.

Fix approach

  • Capture a minimal "pre-auth" identity snapshot before running the authenticate hook (e.g., prevUser = req.session?.user and fields like username, is_admin, readOnly).
  • After authentication, compare prevUser vs req.session.user.
  • Regenerate the session if:
  • prevUser was null/undefined (fresh login), OR
  • the authenticated principal changed (e.g., username changed), OR
  • privileges increased (e.g., prevUser.is_admin !== true and newUser.is_admin === true).
  • Consider adding a regression test for the non-admin→admin transition (or any identity change) to ensure the session id rotates on privilege upgrades.

Fix Focus Areas

  • src/node/hooks/express/webaccess.ts[175-244]

[maintainability] Test ignores cookie prefix
Test ignores cookie prefix `sessionFixation.ts` hard-codes the session cookie name as `express_sid`, but the express-session middleware sets the cookie name to `${settings.cookie.prefix}express_sid`. This makes the new regression test fail or become misleading under non-empty cookie prefixes.

Issue description

The new sessionFixation spec assumes the session cookie name is always express_sid, but production config prefixes it with settings.cookie.prefix. The test should derive the cookie name from settings to remain valid when prefixing is enabled.

Issue Context

Core express-session config uses name: ${settings.cookie.prefix}express_sid``.

Fix Focus Areas

  • src/tests/backend/specs/sessionFixation.ts[67-96]

Implementation notes

  • Add a helper similar to other tests:
  • const cookiePrefix = () => settings.cookie?.prefix || '';
  • const sidCookieName = ${cookiePrefix()}express_sid;
  • Replace all uses of 'express_sid' and Cookie: express_sid=... with sidCookieName.

[security] No rotation on privilege-upgrade
No rotation on privilege-upgrade checkAccess only regenerates when the request started with no req.session.user, but Step 3 explicitly supports re-authentication with different credentials, so an already-authenticated session that upgrades identity/privileges (e.g. non-admin → admin for /admin-auth) will keep the same session id. This leaves a session fixation window across an authentication/privilege boundary that the PR intends to protect.

Issue description

checkAccess() skips session id rotation whenever req.session.user was already set at the start of Step 3. However, Step 3 is documented/implemented to allow re-authentication with different credentials, which can change the authenticated principal or upgrade privileges (for example, non-admin→admin on /admin-auth). In those cases, keeping the old session id defeats the session fixation protection across the privilege boundary.

Issue Context

  • Step 2 can fail for an already-authenticated non-admin user attempting to access an admin-only resource.
  • Step 3 then authenticates again and can replace/upgrade req.session.user.
  • Current logic only rotates when the pre-Step-3 session had no user.

Fix approach

  • Capture a minimal "pre-auth" identity snapshot before running the authenticate hook (e.g., prevUser = req.session?.user and fields like username, is_admin, readOnly).
  • After authentication, compare prevUser vs req.session.user.
  • Regenerate the session if:
  • prevUser was null/undefined (fresh login), OR
  • the authenticated principal changed (e.g., username changed), OR
  • privileges increased (e.g., prevUser.is_admin !== true and newUser.is_admin === true).
  • Consider adding a regression test for the non-admin→admin transition (or any identity change) to ensure the session id rotates on privilege upgrades.

Fix Focus Areas

  • src/node/hooks/express/webaccess.ts[175-244]

[maintainability] Test ignores cookie prefix
Test ignores cookie prefix The new sessionFixation.ts hard-codes the session cookie name as 'express_sid', but Etherpad configures express-session to use `${settings.cookie.prefix}express_sid`. The test will fail under valid configurations that set a non-empty cookie prefix.

Issue description

The new session fixation regression test assumes the session cookie name is always express_sid. In production, the cookie name is derived from configuration (settings.cookie.prefix), so the test is not robust to non-default cookie prefix settings.

Issue Context

src/node/hooks/express.ts configures express-session cookie name as ${settings.cookie.prefix}express_sid, so tests should compute the cookie name the same way.

Fix approach

  • In sessionFixation.ts, compute const sidCookieName = ${settings.cookie.prefix || ''}express_sid;.
  • Use sidCookieName in getSetCookie() calls and when setting the Cookie request header.

Fix Focus Areas

  • src/tests/backend/specs/sessionFixation.ts[26-96]
  • src/node/hooks/express.ts[208-217]


                     PR 8073 (2026-07-25)                    
[correctness] Legacy ':' redirect regresses
Legacy ':' redirect regresses The `/p/:pad` route rejects pad IDs containing `:` before calling `sanitizePadId()`, so legacy colon→underscore canonicalization no longer runs and the route returns 404. This regression is triggered by `isValidPadId()` now forbidding `:` even though `sanitizePadId()` still has a `/:+/g -> '_'` transform intended to preserve legacy access.

Issue description

padurlsanitize validates the raw URL padId with isValidPadId() before it calls sanitizePadId(). With isValidPadId() now rejecting :, requests that previously would have been normalized (e.g., foo:bar → foo_bar) are rejected early.

Issue Context

sanitizePadId() still contains a legacy transform that maps : to _, but it is now bypassed for HTTP pad URLs.

Fix Focus Areas

  • src/node/hooks/express/padurlsanitize.ts[9-28]
  • src/node/db/PadManager.ts[169-173]
  • src/node/db/PadManager.ts[195-209]

Suggested fix

In padurlsanitize.ts, compute sanitizedPadId = await padManager.sanitizePadId(padId) first, then validate sanitizedPadId with isValidPadId(sanitizedPadId).

  • If sanitizedPadId !== padId, redirect to sanitizedPadId (as before).
  • If !isValidPadId(sanitizedPadId) (e.g., an actual stored legacy pad ID containing :), return 404. This preserves legacy :→_ redirect behavior while still preventing : from being treated as a valid canonical pad ID.

[correctness] Legacy ':' redirect regresses
Legacy ':' redirect regresses The `/p/:pad` route rejects pad IDs containing `:` before calling `sanitizePadId()`, so legacy colon→underscore canonicalization no longer runs and the route returns 404. This regression is triggered by `isValidPadId()` now forbidding `:` even though `sanitizePadId()` still has a `/:+/g -> '_'` transform intended to preserve legacy access.

Issue description

padurlsanitize validates the raw URL padId with isValidPadId() before it calls sanitizePadId(). With isValidPadId() now rejecting :, requests that previously would have been normalized (e.g., foo:bar → foo_bar) are rejected early.

Issue Context

sanitizePadId() still contains a legacy transform that maps : to _, but it is now bypassed for HTTP pad URLs.

Fix Focus Areas

  • src/node/hooks/express/padurlsanitize.ts[9-28]
  • src/node/db/PadManager.ts[169-173]
  • src/node/db/PadManager.ts[195-209]

Suggested fix

In padurlsanitize.ts, compute sanitizedPadId = await padManager.sanitizePadId(padId) first, then validate sanitizedPadId with isValidPadId(sanitizedPadId).

  • If sanitizedPadId !== padId, redirect to sanitizedPadId (as before).
  • If !isValidPadId(sanitizedPadId) (e.g., an actual stored legacy pad ID containing :), return 404. This preserves legacy :→_ redirect behavior while still preventing : from being treated as a valid canonical pad ID.

[correctness] Legacy ':' redirect regresses
Legacy ':' redirect regresses The `/p/:pad` route rejects pad IDs containing `:` before calling `sanitizePadId()`, so legacy colon→underscore canonicalization no longer runs and the route returns 404. This regression is triggered by `isValidPadId()` now forbidding `:` even though `sanitizePadId()` still has a `/:+/g -> '_'` transform intended to preserve legacy access.

Issue description

padurlsanitize validates the raw URL padId with isValidPadId() before it calls sanitizePadId(). With isValidPadId() now rejecting :, requests that previously would have been normalized (e.g., foo:bar → foo_bar) are rejected early.

Issue Context

sanitizePadId() still contains a legacy transform that maps : to _, but it is now bypassed for HTTP pad URLs.

Fix Focus Areas

  • src/node/hooks/express/padurlsanitize.ts[9-28]
  • src/node/db/PadManager.ts[169-173]
  • src/node/db/PadManager.ts[195-209]

Suggested fix

In padurlsanitize.ts, compute sanitizedPadId = await padManager.sanitizePadId(padId) first, then validate sanitizedPadId with isValidPadId(sanitizedPadId).

  • If sanitizedPadId !== padId, redirect to sanitizedPadId (as before).
  • If !isValidPadId(sanitizedPadId) (e.g., an actual stored legacy pad ID containing :), return 404. This preserves legacy :→_ redirect behavior while still preventing : from being treated as a valid canonical pad ID.


                     PR 8072 (2026-07-25)                    
[performance] Over-broad Vary headers
Over-broad Vary headers `specialpages.ts` now varies public responses on `x-forwarded-prefix` and `x-ingress-path` even when `sanitizeProxyPath()` will ignore those headers unless `settings.trustProxy` is enabled, unnecessarily fragmenting shared caches on attacker-supplied headers. This reduces cache hit rate and, in some shared-cache/CDN setups, can increase cache churn/resource usage without improving correctness when `trustProxy` is false.

Issue description

varyOnProxyPath() unconditionally varies on x-forwarded-prefix and x-ingress-path, but sanitizeProxyPath() only consults those headers when settings.trustProxy is true. When trustProxy is false, the response representation does not depend on those headers, so advertising them in Vary can cause unnecessary cache-key fragmentation.

Issue Context

  • sanitizeProxyPath() gates x-forwarded-prefix and x-ingress-path on trustProxy.
  • specialpages.ts now unconditionally calls res.vary([...]) for all public routes.

Fix Focus Areas

  • src/node/hooks/express/specialpages.ts[28-35]

Suggested fix

Make varyOnProxyPath() configuration-aware:

  • Always res.vary('x-proxy-path').
  • Only add x-forwarded-prefix and x-ingress-path when settings.trustProxy is true (or when you explicitly enable those headers in sanitizeProxyPath() for the current deployment). Example:

[maintainability] Test omits extra Vary
Test omits extra Vary The new `proxyPathVary.ts` test only asserts `Vary` contains `x-proxy-path`, so it will not catch regressions where `x-forwarded-prefix` or `x-ingress-path` are accidentally removed from the production `PROXY_PATH_VARY_HEADERS` list. This weakens the intended coverage of the newly added multi-header vary behavior.

Issue description

The test helper assertVariesOnProxyPath() only checks for x-proxy-path, even though production code varies on three headers. The test suite would still pass if x-forwarded-prefix or x-ingress-path were removed.

Issue Context

Production defines:

  • ['x-proxy-path', 'x-forwarded-prefix', 'x-ingress-path'] Test asserts only:
  • 'x-proxy-path'

Fix Focus Areas

  • src/tests/backend/specs/proxyPathVary.ts[21-29]
  • src/node/hooks/express/specialpages.ts[33-34]

Suggested fix

Update the test to assert all intended vary headers are present. Options:

  1. Hardcode the expected list in the test and assert each is included.
  2. (Better) If behavior is meant to be configuration-dependent, add a test variant where trustProxy is enabled and verify x-forwarded-prefix + x-ingress-path are included (and/or actually influence output), while still always expecting x-proxy-path. Example assertion:


                     PR 8071 (2026-07-25)                    
[correctness] Sanitizer drops doctype/comments
Sanitizer drops doctype/comments ExportHandler now runs stripRemoteImages() on the full export HTML for the soffice path, but stripRemoteImages reserializes via htmlparser2 without emitting processing instructions or comments, so the template’s "" (and any HTML comments) are removed. This is a behavior change from the prior verbatim temp file and can subtly affect LibreOffice’s HTML parsing/rendering for all soffice exports.

Issue description

ExportHandler now writes stripRemoteImages(html) to the LibreOffice (soffice) temp file. stripRemoteImages() rebuilds markup via htmlparser2 but does not preserve processing instructions (e.g., <!doctype html>) or comments, so the exported HTML handed to LibreOffice is no longer identical to the prior output aside from removed remote <img> tags.

Issue Context

The export template includes <!doctype html> and other document-level nodes. stripRemoteImages() only handles open tags, text, and close tags, so document directives are dropped.

Fix Focus Areas

  • src/node/handler/ExportHandler.ts[162-173]
  • src/node/utils/ExportSanitizeHtml.ts[179-215]
  • src/templates/export_html.html[1-10]

Suggested fix approaches

Choose one:

  1. Preserve doctype/comments in stripRemoteImages():
  • Add onprocessinginstruction and oncomment handlers to append the raw directive/comment to out.
  • Ensure doctype is preserved exactly once.
  1. Sanitize only the <body> content for soffice while keeping the original document wrapper:
  • Extract the <body>...</body> portion, run stripRemoteImages() on that fragment, then splice it back into the original HTML document so the doctype/head stay intact.
  • If there is no <body>, fall back to sanitizing the whole string. Either approach keeps the SSRF hardening while minimizing unintended output changes to the soffice conversion input.


                     PR 8070 (2026-07-25)                    
[reliability] OIDC cookie key unstable
OIDC cookie key unstable expressCreateServer() derives oidc-provider cookie signing keys from settings.sessionKey, but Settings defaults enable cookie key rotation and keep sessionKey null if SESSIONKEY.txt is absent, so resolveOidcCookieKeys() falls back to a per-process random key. This invalidates in-flight OIDC interaction/session cookies on restart and prevents horizontally-scaled pods from sharing valid OIDC cookies unless sso.cookieKeys is explicitly set or SESSIONKEY.txt is provisioned.

Issue description

resolveOidcCookieKeys() falls back to a random key whenever settings.sessionKey is null/empty and settings.sso.cookieKeys is unset/invalid. With the repo’s default cookie rotation settings, settings.sessionKey commonly remains null on fresh installs (no SESSIONKEY.txt created), making the embedded OIDC provider’s cookie-signing key change on every restart (and differ per pod).

Issue Context

The Express stack already has a stable cookie-signing secret when rotation is enabled (via SecretRotator), but OAuth2Provider.ts does not reuse it.

Fix Focus Areas

  • src/node/security/OAuth2Provider.ts[100-109]
  • src/node/utils/Settings.ts[736-761]
  • src/node/utils/Settings.ts[1328-1341]
  • src/node/hooks/express.ts[186-201]

Implementation direction

  • Prefer a stable, deployment-wide secret source even when settings.sessionKey is null:
  • Option A (recommended): Create a dedicated SecretRotator namespace for OIDC cookie keys (e.g. oidcCookieSecrets) stored in the DB, and pass its secrets array to cookies.keys (supports rotation + multi-pod stability).
  • Option B: Plumb the Express cookie signing secret(s) (the secret/secretRotator.secrets) to OAuth2Provider.ts and use that as the fallback input to resolveOidcCookieKeys().
  • Option C: Generate and persist an OIDC cookie secret to disk (separate from deprecated SESSIONKEY) and derive from that.
  • Ensure key rotation semantics are preserved (first key signs; older keys still verify).

[maintainability] Template comment misattached
Template comment misattached settings.json.template documents sso.cookieKeys but does not include an actual cookieKeys property, so the comment block becomes the leading comment for the next real key (sso.clients) in the Admin UI’s template-comment extraction. This can mis-document sso.clients and make cookieKeys harder to discover/configure correctly.

Issue description

The cookieKeys documentation block is inserted above sso.clients, but there is no actual "cookieKeys": ... key in the template. The Admin UI’s comment extractor associates leading comments with the next property node, so this block will be shown for sso.clients.

Issue Context

Admin settings comments are extracted from settings.json.template using jsonc-parser node offsets and adjacent comment lookup.

Fix Focus Areas

  • settings.json.template[967-977]
  • admin/src/components/settings/templateComments.ts[17-37]
  • admin/src/components/settings/comments.ts[33-70]

Implementation direction

  • Add a real "cookieKeys" property in settings.json.template (for example: "cookieKeys": ["${OIDC_COOKIE_KEY:}"],) and place the comment immediately above it.
  • Keep resolveOidcCookieKeys()’s existing filtering so an empty env var value safely falls through to the derived/persisted behavior.


                     PR 8042 (2026-07-10)                    
[maintainability] Brittle Dockerfile test matching
Brittle Dockerfile test matching The new docker regression test uses `indexOf()` on exact Dockerfile instruction strings, so harmless refactors (spacing, `install -d` instead of `mkdir`, added flags) will fail CI even if behavior remains correct. This makes future Dockerfile changes unnecessarily risky.

Issue description

dockerfilePluginVolume.ts asserts Dockerfile behavior via exact substring matches, making the test fragile to non-semantic Dockerfile edits.

Issue Context

The intent is to ensure the runtime stages create src/plugin_packages after copying src, not to lock down the exact shell command text.

Fix Focus Areas

  • src/tests/backend/specs/dockerfilePluginVolume.ts[18-58]

Suggested fix

  • Replace the indexOf('COPY --chown=etherpad:etherpad ./src') and indexOf('RUN mkdir -p ./src/plugin_packages') checks with regex-based matches that tolerate formatting and allow equivalent commands.
  • Example approach:
  • Find the first match index for copying ./src with something like /^COPY\s+--chown=etherpad:etherpad\s+\.\/src\/?\s+\.\/src\/?/m.
  • Find a later match for creating the directory with something like /^RUN\s+.*\b(mkdir\s+-p|install\s+-d)\s+\.\/src\/plugin_packages\b/m.
  • Keep the ordering assertion (mkdirMatch.index > srcCopyMatch.index).


                     PR 8039 (2026-07-09)                    
[reliability] Nullable spread suppressed
Nullable spread suppressed In TextLinesMutator.insert(), the PR adds a new "// @ts-ignore" to silence that splitTextLines() can return null, but the code still spreads the value into Array.push(). If splitTextLines() ever returns null (for example, empty string input), push(...newLines) will throw a TypeError at runtime.

Issue description

splitTextLines() is implemented via String.prototype.match() and therefore has a null return possibility, but callers (including TextLinesMutator.insert()) assume an array and spread it. This PR adds a new // @ts-ignore at the call site instead of fixing the contract, leaving a latent runtime crash.

Issue Context

splitTextLines() is documented as returning string[] but currently returns RegExpMatchArray | null. At minimum, it should be made non-null (either by guaranteeing it returns []/[''] for empty input, or by throwing/asserting on invalid input), and then callers can remove the suppression.

Fix Focus Areas

  • src/static/js/TextLinesMutator.ts[278-307]
  • src/static/js/Changeset.ts[739-746]

[maintainability] any[] erases test types
any[] erases test types In hooks.ts, casting `supportedSyncHookFunctions` to `any[]` before concat removes compile-time validation of the test-case object shape. This makes it easier for future edits to accidentally add malformed cases without TypeScript catching it.

Issue description

The new (supportedSyncHookFunctions as any[]) cast disables type checking for the concatenated test cases, reducing maintainability of the test suite.

Issue Context

The tests later assume every element has name, fn, and either want or wantErr. You can preserve TS checking by defining a HookTestCase type and typing both arrays (or using satisfies HookTestCase[]).

Fix Focus Areas

  • src/tests/backend/specs/hooks.ts[565-660]


                     PR 7992 (2026-06-21)                    
[correctness] Stale unorm bundle entry
Stale unorm bundle entry The PR removes `unorm` from the static-file whitelist, but the client bundle manifest still lists `$unorm/lib/unorm.js` under `ace2_inner.js`, so the server will try to serve a static asset that no longer exists and clients can hit 404s when loading that bundle.

Issue description

unorm was removed from dependencies and from LIBRARY_WHITELIST, but src/node/utils/tar.json still references $unorm/lib/unorm.js for the ace2_inner.js bundle. This leaves a bundle manifest entry pointing to a non-existent static asset, causing 404s/broken bundle loads.

Issue Context

  • getTar() reads tar.json at runtime to build the list of files that make up client bundles.
  • Minify.ts no longer allows serving unorm from node_modules, and unorm is no longer installed.

Fix Focus Areas

  • src/node/utils/tar.json[61-84]
  • (optional verification) src/node/hooks/express/static.ts[13-31]
  • (optional verification) src/node/utils/Minify.ts[39-46]


General

Resources

For Developers

How to's

Set up

Advanced steps

Integrating Etherpad in your web app

for Developers

Clone this wiki locally

⌂ 换网址