Skip to content

Node.js based forum software built for the modern web

proper handling of extensionless files

Julian Lamd25ab31427ac
diff --git a/src/posts/uploads.js b/src/posts/uploads.js
index 5a78e2e1df..c42620c7ad 100644
--- a/src/posts/uploads.js
+++ b/src/posts/uploads.js
@@ -9,7 +9,7 @@ module.exports = function (Posts) {
Posts.uploads.sync = function (pid, callback) {
// Scans a post and updates sorted set of uploads
- const searchRegex = /\/assets\/uploads\/files\/([^\s]+\.[\w]+)/g;
+ const searchRegex = /\/assets\/uploads\/files\/([^\s")]+\.?[\w]*)/g;
async.parallel({
content: async.apply(Posts.getPostField, pid, 'content'),