From c5cd76e798c8bdadaa4288861e59193515066137 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 9 Jun 2023 12:44:06 -0400 Subject: [PATCH 1/5] fix: don't update edit data if edited timestamp is not available --- public/src/client/topic/events.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/public/src/client/topic/events.js b/public/src/client/topic/events.js index 7b78bb4b58..60aacd6cf9 100644 --- a/public/src/client/topic/events.js +++ b/public/src/client/topic/events.js @@ -142,19 +142,21 @@ define('forum/topic/events', [ posts.addBlockquoteEllipses(editedPostEl.parent()); editedPostEl.fadeIn(250); - const editData = { - editor: data.editor, - editedISO: utils.toISOString(data.post.edited), - }; - - app.parseAndTranslate('partials/topic/post-editor', editData, function (html) { - editorEl.replaceWith(html); - postContainer.find('[component="post/edit-indicator"]') - .removeClass('hidden') - .translateAttr('title', `[[global:edited-timestamp, ${editData.editedISO}]]`); - postContainer.find('[component="post/editor"] .timeago').timeago(); - hooks.fire('action:posts.edited', data); - }); + if (data.post.edited) { + const editData = { + editor: data.editor, + editedISO: utils.toISOString(data.post.edited), + }; + + app.parseAndTranslate('partials/topic/post-editor', editData, function (html) { + editorEl.replaceWith(html); + postContainer.find('[component="post/edit-indicator"]') + .removeClass('hidden') + .translateAttr('title', `[[global:edited-timestamp, ${editData.editedISO}]]`); + postContainer.find('[component="post/editor"] .timeago').timeago(); + hooks.fire('action:posts.edited', data); + }); + } }); } else { hooks.fire('action:posts.edited', data); From 1d1639d46f15c5a9c84d3ccfc7a334244c28039a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 13 Jun 2023 11:55:13 -0400 Subject: [PATCH 2/5] fix: improper neutralization of user input in image wrapping code --- public/src/client/topic/images.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/src/client/topic/images.js b/public/src/client/topic/images.js index 8778053821..c4c30319d8 100644 --- a/public/src/client/topic/images.js +++ b/public/src/client/topic/images.js @@ -26,8 +26,9 @@ define('forum/topic/images', [], function () { const srcExt = src.split('.').slice(1).pop(); const altFilename = alt.split('/').pop(); const altExt = altFilename.split('.').slice(1).pop(); + imageEl.wrap(''); } }; From 3eaf04827e75f7f578270fdcd32a4be2dbfc2d8b Mon Sep 17 00:00:00 2001 From: Misty Release Bot Date: Tue, 13 Jun 2023 18:50:11 +0000 Subject: [PATCH 3/5] chore: incrementing version number - v3.1.5 --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 04991202da..0aa7e2be48 100644 --- a/install/package.json +++ b/install/package.json @@ -2,7 +2,7 @@ "name": "nodebb", "license": "GPL-3.0", "description": "NodeBB Forum", - "version": "3.1.4", + "version": "3.1.5", "homepage": "https://www.nodebb.org", "repository": { "type": "git", From b0d1686185f52abadd92447a012e334dba47e155 Mon Sep 17 00:00:00 2001 From: Misty Release Bot Date: Tue, 13 Jun 2023 18:50:11 +0000 Subject: [PATCH 4/5] chore: update changelog for v3.1.5 --- CHANGELOG.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d351b80d..0cc3e7f6f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,39 @@ +#### v3.1.5 (2023-06-13) + +##### Chores + +* fix persona (74174414) +* up themes (97ff1f11) +* incrementing version number - v3.1.4 (2452783c) +* update changelog for v3.1.4 (633dc2de) +* incrementing version number - v3.1.3 (3b4e9d3f) +* incrementing version number - v3.1.2 (40fa3489) +* incrementing version number - v3.1.1 (40250733) +* incrementing version number - v3.1.0 (0cb386bd) +* incrementing version number - v3.0.1 (26f6ea49) +* incrementing version number - v3.0.0 (224e08cd) + +##### New Features + +* add back support for req.body._csrf (67f44a32) + +##### Bug Fixes + +* improper neutralization of user input in image wrapping code (1d1639d4) +* don't update edit data if edited timestamp is not available (c5cd76e7) +* filter null nav items (b73f307a) +* rimraf usage in user image delete (3256fb30) +* closes #11620, fix copy code when line numbers are enabled (82e26829) +* logins dashboard user images (8cb6ebb9) + +##### Refactors + +* change welcome headers to be smaller (0c4870ec) + +##### Tests + +* remove socket.io test (24ebb153) + #### v3.1.4 (2023-05-18) ##### Chores From a757716ddd520e608f6e1d973dabd49b344d033a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 13 Jun 2023 16:08:59 -0400 Subject: [PATCH 5/5] fix: closes #11708, fix quick reply check --- public/src/client/topic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/topic.js b/public/src/client/topic.js index da5ecae1b0..77b4ad9aa6 100644 --- a/public/src/client/topic.js +++ b/public/src/client/topic.js @@ -371,7 +371,7 @@ define('forum/topic', [ } function setupQuickReply() { - if (config.enableQuickReply || config.theme.enableQuickReply) { + if (config.enableQuickReply || (config.theme && config.theme.enableQuickReply)) { quickreply.init(); } }