From c4bdf4853d55bbbf6101dbffeb3ad40854b1481f Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Tue, 9 Jan 2024 09:28:17 +0800 Subject: [PATCH 01/10] chore: update docker-compose default image version to 2.5.3 Signed-off-by: Yukai Huang --- deployments/docker-compose.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deployments/docker-compose.yml b/deployments/docker-compose.yml index b5f2a4d20a..3289ce9928 100644 --- a/deployments/docker-compose.yml +++ b/deployments/docker-compose.yml @@ -11,10 +11,7 @@ services: restart: always codimd: # you can use image or custom build below, - # if you need CJK character with exported PDF files, - # please change the image tag with `cjk` postfix version - image: nabo.codimd.dev/hackmdio/hackmd:2.1.0 - # image: nabo.codimd.dev/hackmdio/hackmd:2.1.0-cjk + image: nabo.codimd.dev/hackmdio/hackmd:2.5.3 # build: # context: .. # dockerfile: ./deployments/Dockerfile From 1407e1641eb403bbf3c8e2e4817e48ad58bb7b66 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Tue, 30 Apr 2024 18:18:36 +0800 Subject: [PATCH 02/10] fix: exclude name attribute from iframe filterXSS allowlist Signed-off-by: Yukai Huang --- public/js/render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/render.js b/public/js/render.js index 4a9c3b25f7..db73a0ce31 100644 --- a/public/js/render.js +++ b/public/js/render.js @@ -20,7 +20,7 @@ whiteList.style = [] // allow kbd tag whiteList.kbd = [] // allow ifram tag with some safe attributes -whiteList.iframe = ['allowfullscreen', 'name', 'referrerpolicy', 'src', 'width', 'height'] +whiteList.iframe = ['allowfullscreen', 'referrerpolicy', 'src', 'width', 'height'] // allow summary tag whiteList.summary = [] // allow ruby tag From 64fecd7d01afbfc0bf3c4a973dd24e401e48ab19 Mon Sep 17 00:00:00 2001 From: Biswa Baibhab Subudhi <94667039+biswabaibhab007@users.noreply.github.com> Date: Fri, 6 Oct 2023 07:15:23 +0530 Subject: [PATCH 03/10] typo opened source -> open sourced Signed-off-by: Yukai Huang --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d9087a468..898bd5d9f3 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ HackMD is built with one promise - **You own and control all your content**: ## CodiMD - The Open Source HackMD -CodiMD is the free software version of [HackMD](https://hackmd.io), developed and opened source by the HackMD team with reduced features (without book mode), you can use CodiMD for your community and own all your data. *(See the [origin of the name CodiMD](https://github.com/hackmdio/hackmd/issues/720).)* +CodiMD is the free software version of [HackMD](https://hackmd.io), developed and open sourced by the HackMD team with reduced features (without book mode), you can use CodiMD for your community and own all your data. *(See the [origin of the name CodiMD](https://github.com/hackmdio/hackmd/issues/720).)* CodiMD is perfect for open communities, while HackMD emphasizes on permission and access controls for commercial use cases. From 0701fd74bc71375c92ae900b93f5baec5bf99c62 Mon Sep 17 00:00:00 2001 From: yamashush <38120991+yamashush@users.noreply.github.com> Date: Sun, 14 Jan 2024 21:38:21 +0900 Subject: [PATCH 04/10] Add index at revision table Signed-off-by: yamashush <38120991+yamashush@users.noreply.github.com> --- lib/migrations/20240114120250-revision-add-index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/migrations/20240114120250-revision-add-index.js diff --git a/lib/migrations/20240114120250-revision-add-index.js b/lib/migrations/20240114120250-revision-add-index.js new file mode 100644 index 0000000000..01d94f56ad --- /dev/null +++ b/lib/migrations/20240114120250-revision-add-index.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface.addIndex('Revisions', ['noteId'], {}) + }, + + down: (queryInterface, Sequelize) => { + return queryInterface.removeIndex('Revisions', 'noteId') + } +}; From 0287726e1b06dbd77c6e85a99fe1903e74ba706c Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Wed, 5 Jun 2024 15:09:21 +0800 Subject: [PATCH 05/10] style: lint fix Signed-off-by: Yukai Huang --- lib/migrations/20240114120250-revision-add-index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/migrations/20240114120250-revision-add-index.js b/lib/migrations/20240114120250-revision-add-index.js index 01d94f56ad..2260e918f2 100644 --- a/lib/migrations/20240114120250-revision-add-index.js +++ b/lib/migrations/20240114120250-revision-add-index.js @@ -1,4 +1,4 @@ -'use strict'; +'use strict' module.exports = { up: (queryInterface, Sequelize) => { @@ -8,4 +8,4 @@ module.exports = { down: (queryInterface, Sequelize) => { return queryInterface.removeIndex('Revisions', 'noteId') } -}; +} From 59a62776c49dedb04af4f2e88023041b5da144cb Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Wed, 5 Jun 2024 15:07:56 +0800 Subject: [PATCH 06/10] fix: use randomFileName as default start file name to ensure the randomness Signed-off-by: Yukai Huang --- lib/imageRouter/filesystem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/imageRouter/filesystem.js b/lib/imageRouter/filesystem.js index 49a811ef49..1f9f52181d 100644 --- a/lib/imageRouter/filesystem.js +++ b/lib/imageRouter/filesystem.js @@ -22,7 +22,7 @@ function randomFilename () { */ function pickFilename (defaultFilename) { let retryCounter = 5 - let filename = defaultFilename + let filename = randomFilename() const extname = path.extname(defaultFilename) while (retryCounter-- > 0) { if (fs.existsSync(path.join(config.uploadsPath, filename))) { From 5eb35917ab0d3ab6ae908ffa308df09ad7878c4b Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Wed, 5 Jun 2024 15:12:56 +0800 Subject: [PATCH 07/10] Update lib/imageRouter/filesystem.js Co-authored-by: Max Wu Signed-off-by: Yukai Huang --- lib/imageRouter/filesystem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/imageRouter/filesystem.js b/lib/imageRouter/filesystem.js index 1f9f52181d..76dd92dcf6 100644 --- a/lib/imageRouter/filesystem.js +++ b/lib/imageRouter/filesystem.js @@ -22,8 +22,8 @@ function randomFilename () { */ function pickFilename (defaultFilename) { let retryCounter = 5 - let filename = randomFilename() const extname = path.extname(defaultFilename) + let filename = `${randomFilename()}${extname}` while (retryCounter-- > 0) { if (fs.existsSync(path.join(config.uploadsPath, filename))) { filename = `${randomFilename()}${extname}` From 3285121ffbd53370354a40c5e9f424324d2fb802 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 6 Jun 2024 14:26:43 +0800 Subject: [PATCH 08/10] chore: update release note for 2.5.4 Signed-off-by: Yukai Huang --- public/docs/release-notes.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/public/docs/release-notes.md b/public/docs/release-notes.md index 63a9e0084f..9bccacbcf6 100644 --- a/public/docs/release-notes.md +++ b/public/docs/release-notes.md @@ -1,6 +1,23 @@ Release Notes === + 2.5.4 2024-06-06 +--- + +[Check out the complete release note][v2_5_4]. Thank you CodiMD community and all our contributors. ❤️ + +[v2_5_4]: https://hackmd.io/@codimd/release-notes/%2F%40codimd%2Fv2_5_4 + +## Enhancements + +- Add index at revision table for improving system performance [#1856](https://github.com/hackmdio/codimd/pull/1856) +- Refactor to reuse random filename in filesystem image provider [#1867](https://github.com/hackmdio/codimd/pull/1867) + +## Fixes + +- Fix exclusion of name attribute from iframe filterXSS allowlist [#1865](https://github.com/hackmdio/codimd/pull/1865) +- Fix typo: "opened source" -> "open sourced" [#1869](https://github.com/hackmdio/codimd/pull/1869) + 2.5.3 2024-01-08 --- From 94ec934c65f6fa52b96b09bfcdb9d9119b0bf810 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 6 Jun 2024 14:31:43 +0800 Subject: [PATCH 09/10] chore: bump package version to 2.5.4 Signed-off-by: Yukai Huang --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 82da5cb1bd..941dc9bcd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "codimd", - "version": "2.5.3", + "version": "2.5.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "codimd", - "version": "2.5.3", + "version": "2.5.4", "license": "AGPL-3.0", "dependencies": { "@aws-sdk/client-s3-node": "0.1.0-preview.2", diff --git a/package.json b/package.json index da2a000d28..32163a0a98 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codimd", - "version": "2.5.3", + "version": "2.5.4", "description": "Realtime collaborative markdown notes on all platforms.", "keywords": [ "Collaborative", From 90d44b4d91c503873567b8edbd00e432c8d38f04 Mon Sep 17 00:00:00 2001 From: yoyogix Date: Fri, 19 Jul 2024 17:09:02 +0900 Subject: [PATCH 10/10] =?UTF-8?q?migration=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E5=90=8D=E3=82=92master-smarthr=E3=81=AE=E3=82=82?= =?UTF-8?q?=E3=81=AE=E3=81=A8=E6=8F=83=E3=81=88=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...revision-add-index.js => 20230831234802-revision-add-index.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lib/migrations/{20240114120250-revision-add-index.js => 20230831234802-revision-add-index.js} (100%) diff --git a/lib/migrations/20240114120250-revision-add-index.js b/lib/migrations/20230831234802-revision-add-index.js similarity index 100% rename from lib/migrations/20240114120250-revision-add-index.js rename to lib/migrations/20230831234802-revision-add-index.js