diff --git a/app/routes/profile.js b/app/routes/profile.js index 4282d55cbf..ea73b1de21 100644 --- a/app/routes/profile.js +++ b/app/routes/profile.js @@ -20,10 +20,10 @@ function ProfileHandler (db) { // while the developer intentions were correct in encoding the user supplied input so it // doesn't end up as an XSS attack, the context is incorrect as it is encoding the firstname for HTML // while this same variable is also used in the context of a URL link element - doc.firstNameSafeString = ESAPI.encoder().encodeForHTML(doc.firstName) + doc.website = ESAPI.encoder().encodeForHTML(doc.website) // fix it by replacing the above with another template variable that is used for // the context of a URL in a link header - // doc.doc.firstNameSafeURLString = ESAPI.encoder().encodeForURL(urlInput) + // doc.website = ESAPI.encoder().encodeForURL(doc.website) return res.render("profile", doc); }); diff --git a/app/views/profile.html b/app/views/profile.html index 9110c7aafc..a0a342b20a 100644 --- a/app/views/profile.html +++ b/app/views/profile.html @@ -65,6 +65,11 @@

Edit Profile

+
+ + +