Skip to content

Node.js based forum software built for the modern web

test: fix relative_path test

Barış Soner Uşaklıc4efdeb9c4d3
diff --git a/test/user.js b/test/user.js
index a865666ac9..bc12b60b70 100644
--- a/test/user.js
+++ b/test/user.js
@@ -1031,7 +1031,7 @@ describe('User', () => {
await db.sortedSetAdd(`uid:${uid}:profile:pictures`, Date.now(), '/test');
await apiUser.changePicture({ uid: uid }, { type: 'uploaded', picture: '/test', uid: uid });
const picture = await User.getUserField(uid, 'picture');
- assert.equal(picture, `${nconf.get('relative_path')}/test`);
+ assert.equal(picture, validator.escape(`${nconf.get('relative_path')}/test`));
});
it('should return error if profile image uploads disabled', (done) => {