Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit f88f28e

Browse files
committed
fix(users): Profile image path is invalid after escaping
Removes the validator.escape on the profileImageUrl field in core server controller. The escaping was causing the profileImageUrl field to be an invalid path for the image. We don't need to worry about xss vulnerabilities on this field because no user input is provided; the name & path are generated by the application logic. Fixes #1127
1 parent 039d9de commit f88f28e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/core/server/controllers/core.server.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exports.renderIndex = function (req, res) {
1515
username: validator.escape(req.user.username),
1616
created: req.user.created.toString(),
1717
roles: req.user.roles,
18-
profileImageURL: validator.escape(req.user.profileImageURL),
18+
profileImageURL: req.user.profileImageURL,
1919
email: validator.escape(req.user.email),
2020
lastName: validator.escape(req.user.lastName),
2121
firstName: validator.escape(req.user.firstName)

0 commit comments

Comments
 (0)