Skip to content

Node.js based forum software built for the modern web

fix: don't prepend relative_path to absolute URLs in getProfilePictures (#14176)

Dirk Plate37f231909194
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]]',
});
});