From 37f231909194ff47adaa1bd528786077467a8ed6 Mon Sep 17 00:00:00 2001 From: Dirk Plate Date: Wed, 15 Apr 2026 14:59:36 +0200 Subject: [PATCH] fix: don't prepend relative_path to absolute URLs in getProfilePictures (#14176) Upload plugins like nodebb-plugin-cloudinary store full absolute URLs in the uid:{uid}:profile:pictures sorted set. The code unconditionally prepends relative_path, producing broken URLs like /forumhttps://... Add the same startsWith('http') check used elsewhere in the codebase. --- src/socket.io/user/picture.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket.io/user/picture.js b/src/socket.io/user/picture.js index d63f28e61c..5800a0e794 100644 --- a/src/socket.io/user/picture.js +++ b/src/socket.io/user/picture.js @@ -39,7 +39,7 @@ module.exports = function (SocketUser) { userPictures.forEach((picture) => { list.pictures.push({ type: 'uploaded', - url: `${nconf.get('relative_path')}${picture}`, + url: picture.startsWith('http') ? picture : `${nconf.get('relative_path')}${picture}`, text: '[[user:uploaded-picture]]', }); });