From 5675e6366beff292eb9ee91fd265986f5d25dd33 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 14 Apr 2025 18:36:54 +0300 Subject: [PATCH 01/11] chore(api): document `getWeekNote` --- src/services/date_notes.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/services/date_notes.ts b/src/services/date_notes.ts index 44c5b07aa..ee88702ab 100644 --- a/src/services/date_notes.ts +++ b/src/services/date_notes.ts @@ -401,6 +401,13 @@ function getWeekFirstDayNote(dateStr: string, rootNote: BNote | null = null) { return getDayNote(weekStartDate.format("YYYY-MM-DD"), rootNote); } +/** + * Returns the {@link BNote} corresponding to the given week. If there is no note associated yet to that week, it will be created and returned instead. + * + * @param weekStr the week for which to return the corresponding note, in the format `2024-W04`. + * @param _rootNote a {@link BNote} representing the calendar root, or {@code null} or not specified to use the default root calendar note. + * @returns a Promise that resolves to the {@link BNote} corresponding to the week note. + */ async function getWeekNote(weekStr: string, _rootNote: BNote | null = null): Promise { const rootNote = _rootNote || getRootCalendarNote(); if (!rootNote.hasLabel("enableWeekNote")) { From 77ec3e2170b7e178b848d70542ac151ea3682ff5 Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Mon, 14 Apr 2025 19:33:37 +0200 Subject: [PATCH 02/11] fix(deps): update vite from 6.2.5 to 6.2.6 fixes vulnerability vite 6.2.0 - 6.2.5 Severity: moderate Vite has an `server.fs.deny` bypass with an invalid `request-target` - https://github.com/advisories/GHSA-356w-63v5-8wf4 --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 125fbb4c9..1fb750095 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20763,9 +20763,9 @@ } }, "node_modules/vite": { - "version": "6.2.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.5.tgz", - "integrity": "sha512-j023J/hCAa4pRIUH6J9HemwYfjB5llR2Ps0CWeikOtdR8+pAURAk0DoJC5/mm9kd+UgdnIy7d6HE4EAvlYhPhA==", + "version": "6.2.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.6.tgz", + "integrity": "sha512-9xpjNl3kR4rVDZgPNdTL0/c6ao4km69a/2ihNQbcANz8RuCOK3hQBmLSJf3bRKVQjVMda+YvizNE8AwvogcPbw==", "dev": true, "license": "MIT", "dependencies": { From c76439a35f9ae32719e4b32dc707ff672c063b99 Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Mon, 14 Apr 2025 19:43:58 +0200 Subject: [PATCH 03/11] docs: fix tiny typo --- .../1. Installing the server/Using Docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.md b/docs/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.md index 593cd7c84..8ab913570 100644 --- a/docs/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.md +++ b/docs/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.md @@ -50,7 +50,7 @@ Trilium requires a directory on the host system to store its data. This director #### Local Access Only -Run the container to make it accessible only from the localhost. This setup is suitable for testing or when using a prox ay server like Nginx or Apache. +Run the container to make it accessible only from the localhost. This setup is suitable for testing or when using a proxy server like Nginx or Apache. ``` sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION] From ed6ba97a6922e406b7c55ec0be70c4c5f3153bc6 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 14 Apr 2025 20:03:09 +0300 Subject: [PATCH 04/11] chore(release): typo --- docs/Release Notes/Release Notes/v0.92.8-beta.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Release Notes/Release Notes/v0.92.8-beta.md b/docs/Release Notes/Release Notes/v0.92.8-beta.md index 6cabea71f..58b5e6188 100644 --- a/docs/Release Notes/Release Notes/v0.92.8-beta.md +++ b/docs/Release Notes/Release Notes/v0.92.8-beta.md @@ -20,7 +20,7 @@ * Preserve include note. * Handle note titles that contain inline code. * In-app help: - * Document structure is now precalculated, so start-up time should be slightly increased. + * Document structure is now precalculated, so start-up time should be slightly better. * Optimized the content in order to reduce the size on disk. * Mobile improvements: * The following dialogs are now accessible: bulk actions, branch prefix, include note, add link, sort child notes, note type selector, move/clone to, import/export, markdown import, note revisions, info dialog. From e61532566a8f67e24b79aebe41eb0c5afbefc498 Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Mon, 14 Apr 2025 20:02:56 +0200 Subject: [PATCH 05/11] refactor(cookiePath): remove non-working cookiePath option from config-sample.ini not sure how I managed to forget to commit this as well, this should've been part of (the now already approved & merged) PR #1686 as well --- config-sample.ini | 7 ------- 1 file changed, 7 deletions(-) diff --git a/config-sample.ini b/config-sample.ini index b2dace5c8..83f10c4f7 100644 --- a/config-sample.ini +++ b/config-sample.ini @@ -27,13 +27,6 @@ trustedReverseProxy=false [Session] -# Use this setting to set a custom value for the "Path" Attribute value of the session cookie. -# This can be useful, when you have several instances running on the same domain, under different paths (e.g. by using a reverse proxy). -# It prevents your instances from overwriting each others' cookies, allowing you to stay logged in multiple instances simultanteously. -# E.g. if you have instances running under https://your-domain.com/triliumNext/instanceA and https://your-domain.com/triliumNext/instanceB -# you would want to set the cookiePath value to "/triliumNext/instanceA" for your first and "/triliumNext/instanceB" for your second instance -cookiePath=/ - # Use this setting to set a custom value for the "Max-Age" Attribute of the session cookie. # This controls how long your session will be valid, before it expires and you need to log in again, when you use the "Remember Me" option. # Value needs to be entered in Seconds. From 2758fa58464487ee259e158eacd9ebf8f069ca54 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 14 Apr 2025 23:37:40 +0300 Subject: [PATCH 06/11] fix(client): grey background in classic theme (closes #1689) --- docs/Release Notes/Release Notes/v0.92.8-beta.md | 1 + src/public/app/layouts/desktop_layout.ts | 1 + src/public/app/layouts/mobile_layout.ts | 3 +-- src/public/app/widgets/containers/root_container.ts | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Release Notes/Release Notes/v0.92.8-beta.md b/docs/Release Notes/Release Notes/v0.92.8-beta.md index 58b5e6188..de191a4db 100644 --- a/docs/Release Notes/Release Notes/v0.92.8-beta.md +++ b/docs/Release Notes/Release Notes/v0.92.8-beta.md @@ -11,6 +11,7 @@ * Note tree not closing when selecting some of the menu actions. * [Most tree context menu on mobile are broken](https://github.com/TriliumNext/Notes/issues/671) * [Quick search launch bar item does nothing in vertical layout](https://github.com/TriliumNext/Notes/issues/1680) +* [Note background is gray in 0.92.7 (light theme)](https://github.com/TriliumNext/Notes/issues/1689) ## ✨ Improvements diff --git a/src/public/app/layouts/desktop_layout.ts b/src/public/app/layouts/desktop_layout.ts index ee6faed63..4ca86197a 100644 --- a/src/public/app/layouts/desktop_layout.ts +++ b/src/public/app/layouts/desktop_layout.ts @@ -122,6 +122,7 @@ export default class DesktopLayout { const rootContainer = new RootContainer(true) .setParent(appContext) + .class((launcherPaneIsHorizontal ? "horizontal" : "vertical") + "-layout") .optChild( fullWidthTabBar, new FlexContainer("row") diff --git a/src/public/app/layouts/mobile_layout.ts b/src/public/app/layouts/mobile_layout.ts index f652e5f23..f6d69f4c6 100644 --- a/src/public/app/layouts/mobile_layout.ts +++ b/src/public/app/layouts/mobile_layout.ts @@ -7,8 +7,6 @@ import ToggleSidebarButtonWidget from "../widgets/mobile_widgets/toggle_sidebar_ import MobileDetailMenuWidget from "../widgets/mobile_widgets/mobile_detail_menu.js"; import ScreenContainer from "../widgets/mobile_widgets/screen_container.js"; import ScrollingContainer from "../widgets/containers/scrolling_container.js"; -import ProtectedSessionPasswordDialog from "../widgets/dialogs/protected_session_password.js"; -import ConfirmDialog from "../widgets/dialogs/confirm.js"; import FilePropertiesWidget from "../widgets/ribbon_widgets/file_properties.js"; import FloatingButtons from "../widgets/floating_buttons/floating_buttons.js"; import EditButton from "../widgets/floating_buttons/edit_button.js"; @@ -118,6 +116,7 @@ export default class MobileLayout { getRootWidget(appContext: typeof AppContext) { const rootContainer = new RootContainer(true) .setParent(appContext) + .class("horizontal-layout") .cssBlock(MOBILE_CSS) .child(new FlexContainer("column").id("mobile-sidebar-container")) .child( diff --git a/src/public/app/widgets/containers/root_container.ts b/src/public/app/widgets/containers/root_container.ts index 251a92691..c941cdd88 100644 --- a/src/public/app/widgets/containers/root_container.ts +++ b/src/public/app/widgets/containers/root_container.ts @@ -19,7 +19,6 @@ export default class RootContainer extends FlexContainer { this.id("root-widget"); this.css("height", "100dvh"); - this.class((isHorizontalLayout ? "horizontal" : "vertical") + "-layout"); this.originalViewportHeight = getViewportHeight(); } From 37e66dc640941f4384306430b43d2fc148d4803a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 14 Apr 2025 23:47:24 +0300 Subject: [PATCH 07/11] chore(docs): update some small sections in README --- README.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 30f4dc124..bb6e45836 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for q ### Migrating from Trilium? -There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Just upgrade your Trilium instance to the latest version and [install TriliumNext/Notes as usual](#-installation) +There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Simply [install TriliumNext/Notes](#-installation) as usual and it will use your existing database. Versions up to and including [v0.90.4](https://github.com/TriliumNext/Notes/releases/tag/v0.90.4) are compatible with the latest zadam/trilium version of [v0.63.7](https://github.com/zadam/trilium/releases/tag/v0.63.7). Any later versions of TriliumNext have their sync versions incremented. @@ -66,17 +66,7 @@ To use TriliumNext on your desktop machine (Linux, MacOS, and Windows) you have * Download the binary release for your platform from the [latest release page](https://github.com/TriliumNext/Notes/releases/latest), unzip the package and run the ```trilium``` executable. * Access TriliumNext via the web interface of a server installation (see below) * Currently only the latest versions of Chrome & Firefox are supported (and tested). -* (Coming Soon) TriliumNext will also be provided as a Flatpak - -#### MacOS -Currently when running TriliumNext/Notes on MacOS, you may get the following error: -> Apple could not verify "TriliumNext Notes" is free of malware and may harm your Mac or compromise your privacy. - -You will need to run the command on your shell to resolve the error (documented [here](https://github.com/TriliumNext/Notes/issues/329#issuecomment-2287164137)): - -```bash -xattr -c "/path/to/Trilium Next.app" -``` +* TriliumNext is also provided as a Flatpak, but not yet published on FlatHub. ### Mobile From a5d587abe4dcce8c99b9331a052218f04094f106 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 02:50:48 +0000 Subject: [PATCH 08/11] chore(deps): update dependency typescript-eslint to v8.30.1 --- package-lock.json | 98 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1fb750095..2a91a7129 100644 --- a/package-lock.json +++ b/package-lock.json @@ -194,7 +194,7 @@ "typedoc": "0.28.2", "typedoc-plugin-missing-exports": "4.0.0", "typescript": "5.8.3", - "typescript-eslint": "8.29.1", + "typescript-eslint": "8.30.1", "vanilla-js-wheel-zoom": "9.0.4", "vitest": "3.1.1", "webpack": "5.99.5", @@ -5528,17 +5528,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.29.1.tgz", - "integrity": "sha512-ba0rr4Wfvg23vERs3eB+P3lfj2E+2g3lhWcCVukUuhtcdUx5lSIFZlGFEBHKr+3zizDa/TvZTptdNHVZWAkSBg==", + "version": "8.30.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.30.1.tgz", + "integrity": "sha512-v+VWphxMjn+1t48/jO4t950D6KR8JaJuNXzi33Ve6P8sEmPr5k6CEXjdGwT6+LodVnEa91EQCtwjWNUCPweo+Q==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.29.1", - "@typescript-eslint/type-utils": "8.29.1", - "@typescript-eslint/utils": "8.29.1", - "@typescript-eslint/visitor-keys": "8.29.1", + "@typescript-eslint/scope-manager": "8.30.1", + "@typescript-eslint/type-utils": "8.30.1", + "@typescript-eslint/utils": "8.30.1", + "@typescript-eslint/visitor-keys": "8.30.1", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -5558,16 +5558,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.29.1.tgz", - "integrity": "sha512-zczrHVEqEaTwh12gWBIJWj8nx+ayDcCJs06yoNMY0kwjMWDM6+kppljY+BxWI06d2Ja+h4+WdufDcwMnnMEWmg==", + "version": "8.30.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.30.1.tgz", + "integrity": "sha512-H+vqmWwT5xoNrXqWs/fesmssOW70gxFlgcMlYcBaWNPIEWDgLa4W9nkSPmhuOgLnXq9QYgkZ31fhDyLhleCsAg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.29.1", - "@typescript-eslint/types": "8.29.1", - "@typescript-eslint/typescript-estree": "8.29.1", - "@typescript-eslint/visitor-keys": "8.29.1", + "@typescript-eslint/scope-manager": "8.30.1", + "@typescript-eslint/types": "8.30.1", + "@typescript-eslint/typescript-estree": "8.30.1", + "@typescript-eslint/visitor-keys": "8.30.1", "debug": "^4.3.4" }, "engines": { @@ -5583,14 +5583,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.29.1.tgz", - "integrity": "sha512-2nggXGX5F3YrsGN08pw4XpMLO1Rgtnn4AzTegC2MDesv6q3QaTU5yU7IbS1tf1IwCR0Hv/1EFygLn9ms6LIpDA==", + "version": "8.30.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.30.1.tgz", + "integrity": "sha512-+C0B6ChFXZkuaNDl73FJxRYT0G7ufVPOSQkqkpM/U198wUwUFOtgo1k/QzFh1KjpBitaK7R1tgjVz6o9HmsRPg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.29.1", - "@typescript-eslint/visitor-keys": "8.29.1" + "@typescript-eslint/types": "8.30.1", + "@typescript-eslint/visitor-keys": "8.30.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5601,14 +5601,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.29.1.tgz", - "integrity": "sha512-DkDUSDwZVCYN71xA4wzySqqcZsHKic53A4BLqmrWFFpOpNSoxX233lwGu/2135ymTCR04PoKiEEEvN1gFYg4Tw==", + "version": "8.30.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.30.1.tgz", + "integrity": "sha512-64uBF76bfQiJyHgZISC7vcNz3adqQKIccVoKubyQcOnNcdJBvYOILV1v22Qhsw3tw3VQu5ll8ND6hycgAR5fEA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.29.1", - "@typescript-eslint/utils": "8.29.1", + "@typescript-eslint/typescript-estree": "8.30.1", + "@typescript-eslint/utils": "8.30.1", "debug": "^4.3.4", "ts-api-utils": "^2.0.1" }, @@ -5625,9 +5625,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.29.1.tgz", - "integrity": "sha512-VT7T1PuJF1hpYC3AGm2rCgJBjHL3nc+A/bhOp9sGMKfi5v0WufsX/sHCFBfNTx2F+zA6qBc/PD0/kLRLjdt8mQ==", + "version": "8.30.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.30.1.tgz", + "integrity": "sha512-81KawPfkuulyWo5QdyG/LOKbspyyiW+p4vpn4bYO7DM/hZImlVnFwrpCTnmNMOt8CvLRr5ojI9nU1Ekpw4RcEw==", "dev": true, "license": "MIT", "engines": { @@ -5639,14 +5639,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.29.1.tgz", - "integrity": "sha512-l1enRoSaUkQxOQnbi0KPUtqeZkSiFlqrx9/3ns2rEDhGKfTa+88RmXqedC1zmVTOWrLc2e6DEJrTA51C9iLH5g==", + "version": "8.30.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.30.1.tgz", + "integrity": "sha512-kQQnxymiUy9tTb1F2uep9W6aBiYODgq5EMSk6Nxh4Z+BDUoYUSa029ISs5zTzKBFnexQEh71KqwjKnRz58lusQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.29.1", - "@typescript-eslint/visitor-keys": "8.29.1", + "@typescript-eslint/types": "8.30.1", + "@typescript-eslint/visitor-keys": "8.30.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -5692,16 +5692,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.29.1.tgz", - "integrity": "sha512-QAkFEbytSaB8wnmB+DflhUPz6CLbFWE2SnSCrRMEa+KnXIzDYbpsn++1HGvnfAsUY44doDXmvRkO5shlM/3UfA==", + "version": "8.30.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.30.1.tgz", + "integrity": "sha512-T/8q4R9En2tcEsWPQgB5BQ0XJVOtfARcUvOa8yJP3fh9M/mXraLxZrkCfGb6ChrO/V3W+Xbd04RacUEqk1CFEQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.29.1", - "@typescript-eslint/types": "8.29.1", - "@typescript-eslint/typescript-estree": "8.29.1" + "@typescript-eslint/scope-manager": "8.30.1", + "@typescript-eslint/types": "8.30.1", + "@typescript-eslint/typescript-estree": "8.30.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5716,13 +5716,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.29.1.tgz", - "integrity": "sha512-RGLh5CRaUEf02viP5c1Vh1cMGffQscyHe7HPAzGpfmfflFg1wUz2rYxd+OZqwpeypYvZ8UxSxuIpF++fmOzEcg==", + "version": "8.30.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.30.1.tgz", + "integrity": "sha512-aEhgas7aJ6vZnNFC7K4/vMGDGyOiqWcYZPpIWrTKuTAlsvDNKy2GFDqh9smL+iq069ZvR0YzEeq0B8NJlLzjFA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.29.1", + "@typescript-eslint/types": "8.30.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -20330,15 +20330,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.29.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.29.1.tgz", - "integrity": "sha512-f8cDkvndhbQMPcysk6CUSGBWV+g1utqdn71P5YKwMumVMOG/5k7cHq0KyG4O52nB0oKS4aN2Tp5+wB4APJGC+w==", + "version": "8.30.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.30.1.tgz", + "integrity": "sha512-D7lC0kcehVH7Mb26MRQi64LMyRJsj3dToJxM1+JVTl53DQSV5/7oUGWQLcKl1C1KnoVHxMMU2FNQMffr7F3Row==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.29.1", - "@typescript-eslint/parser": "8.29.1", - "@typescript-eslint/utils": "8.29.1" + "@typescript-eslint/eslint-plugin": "8.30.1", + "@typescript-eslint/parser": "8.30.1", + "@typescript-eslint/utils": "8.30.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" diff --git a/package.json b/package.json index a36ad074b..21615c382 100644 --- a/package.json +++ b/package.json @@ -251,7 +251,7 @@ "typedoc": "0.28.2", "typedoc-plugin-missing-exports": "4.0.0", "typescript": "5.8.3", - "typescript-eslint": "8.29.1", + "typescript-eslint": "8.30.1", "vanilla-js-wheel-zoom": "9.0.4", "vitest": "3.1.1", "webpack": "5.99.5", From fa350e13f6e89ae0ab1b293373ce86c1c5fc2538 Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Tue, 15 Apr 2025 08:37:10 +0200 Subject: [PATCH 09/11] fix(login): send back 401 Unauthorized on failed login attempt --- src/routes/login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/login.ts b/src/routes/login.ts index 3f4d52f32..9387e18fc 100644 --- a/src/routes/login.ts +++ b/src/routes/login.ts @@ -134,7 +134,7 @@ function sendLoginError(req: Request, res: Response, errorType: 'password' | 'to log.info(`WARNING: Wrong password from ${req.ip}, rejecting.`); } - res.render('login', { + res.status(401).render('login', { wrongPassword: errorType === 'password', wrongTotp: errorType === 'totp', totpEnabled: totp.isTotpEnabled(), From ce83c918fb7f33cdfb1620416f5375640be4e73d Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Tue, 15 Apr 2025 09:09:28 +0200 Subject: [PATCH 10/11] fix(login): fix regression that removed support for setting custom cookieMaxAge regression introduced with #401 custom cookieMaxAge feature added with #1156 fixes #1709 --- src/routes/login.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/routes/login.ts b/src/routes/login.ts index 3f4d52f32..7c783bbe7 100644 --- a/src/routes/login.ts +++ b/src/routes/login.ts @@ -92,11 +92,10 @@ function login(req: Request, res: Response) { const rememberMe = req.body.rememberMe; req.session.regenerate(() => { - if (rememberMe) { - req.session.cookie.maxAge = 21 * 24 * 3600000; // 3 weeks - } else { + if (!rememberMe) { // unset default maxAge set by sessionParser - // Cookie becomes non-persistent and expires after current browser session (e.g. when browser is closed) + // Cookie becomes non-persistent and expires + // after current browser session (e.g. when browser is closed) req.session.cookie.maxAge = undefined; } From 627e90ef89cf07d85ec0f1a6940d5b497ac5c0bd Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 15 Apr 2025 13:13:23 +0300 Subject: [PATCH 11/11] chore(release): update change log --- docs/Release Notes/Release Notes/v0.92.8-beta.md | 2 ++ src/public/app/widgets/type_widgets/ckeditor/config.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/Release Notes/Release Notes/v0.92.8-beta.md b/docs/Release Notes/Release Notes/v0.92.8-beta.md index de191a4db..3b99b9519 100644 --- a/docs/Release Notes/Release Notes/v0.92.8-beta.md +++ b/docs/Release Notes/Release Notes/v0.92.8-beta.md @@ -12,6 +12,8 @@ * [Most tree context menu on mobile are broken](https://github.com/TriliumNext/Notes/issues/671) * [Quick search launch bar item does nothing in vertical layout](https://github.com/TriliumNext/Notes/issues/1680) * [Note background is gray in 0.92.7 (light theme)](https://github.com/TriliumNext/Notes/issues/1689) +* [config.Session.cookieMaxAge is ignored](https://github.com/TriliumNext/Notes/issues/1709) by @pano9000 +* [Return correct HTTP status code on failed login attempts instead of 200](https://github.com/TriliumNext/Notes/issues/1707) by @pano9000 ## ✨ Improvements diff --git a/src/public/app/widgets/type_widgets/ckeditor/config.ts b/src/public/app/widgets/type_widgets/ckeditor/config.ts index 6d4726999..817825ac3 100644 --- a/src/public/app/widgets/type_widgets/ckeditor/config.ts +++ b/src/public/app/widgets/type_widgets/ckeditor/config.ts @@ -74,7 +74,7 @@ export function buildConfig() { heading: { options: [ { model: "paragraph" as const, title: "Paragraph", class: "ck-heading_paragraph" }, - // // heading1 is not used since that should be a note's title + // heading1 is not used since that should be a note's title { model: "heading2" as const, view: "h2", title: "Heading 2", class: "ck-heading_heading2" }, { model: "heading3" as const, view: "h3", title: "Heading 3", class: "ck-heading_heading3" }, { model: "heading4" as const, view: "h4", title: "Heading 4", class: "ck-heading_heading4" },