From e110ce51356227fa2a189de93553aa092c654888 Mon Sep 17 00:00:00 2001 From: nova Date: Sat, 7 Dec 2019 13:34:54 +0530 Subject: [PATCH] moved around html sanitizing to fix html not being rendered when loading chat messages --- chatto/src/main/javascript/package.json | 1 + chatto/src/main/javascript/ts/src/view/ChatView.ts | 11 +++++++---- chatto/src/main/javascript/yarn.lock | 12 ++++++++++++ chatto/src/main/resources/static/js/bundle.js | 13 ++++++++----- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/chatto/src/main/javascript/package.json b/chatto/src/main/javascript/package.json index ea884f9..e98f604 100644 --- a/chatto/src/main/javascript/package.json +++ b/chatto/src/main/javascript/package.json @@ -1,6 +1,7 @@ { "dependencies": { "@types/dompurify": "^2.0.0", + "@types/jquery": "^3.3.31", "@types/markdown-it": "^0.0.9", "@types/sjcl": "^1.0.28", "@types/sprintf-js": "^1.1.2", diff --git a/chatto/src/main/javascript/ts/src/view/ChatView.ts b/chatto/src/main/javascript/ts/src/view/ChatView.ts index 55acdbc..6f04556 100644 --- a/chatto/src/main/javascript/ts/src/view/ChatView.ts +++ b/chatto/src/main/javascript/ts/src/view/ChatView.ts @@ -28,14 +28,17 @@ export class ChatView implements Observer { log.info('ChatView: updating view'); let html: string = ""; data.forEach((vm: ChatMessageViewModel) => { - html += this._messageSendTemplate(vm); + const vmTemp = vm; + vmTemp.message = md.render(vm.message); + $(this._element).append(DOMPurify.sanitize(this._messageSendTemplate(vmTemp))); + // html += this._messageSendTemplate(vm); }); /** Very Important!!! * Sanitizing HTML before displaying on webpage to prevent XSS attacks!! */ - html = DOMPurify.sanitize(md.render(html)); - this._element.innerHTML = html; - log.debug(this._element.innerHTML); + // html = DOMPurify.sanitize(md.render(html)); + // this._element.innerHTML = html; + // log.debug(this._element.innerHTML); } } \ No newline at end of file diff --git a/chatto/src/main/javascript/yarn.lock b/chatto/src/main/javascript/yarn.lock index 7778007..b16f60b 100644 --- a/chatto/src/main/javascript/yarn.lock +++ b/chatto/src/main/javascript/yarn.lock @@ -9,6 +9,13 @@ dependencies: "@types/trusted-types" "*" +"@types/jquery@^3.3.31": + version "3.3.31" + resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.31.tgz#27c706e4bf488474e1cb54a71d8303f37c93451b" + integrity sha512-Lz4BAJihoFw5nRzKvg4nawXPzutkv7wmfQ5121avptaSIXlDNJCUuxZxX/G+9EVidZGuO0UBlk+YjKbwRKJigg== + dependencies: + "@types/sizzle" "*" + "@types/linkify-it@*": version "2.1.0" resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-2.1.0.tgz#ea3dd64c4805597311790b61e872cbd1ed2cd806" @@ -21,6 +28,11 @@ dependencies: "@types/linkify-it" "*" +"@types/sizzle@*": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.2.tgz#a811b8c18e2babab7d542b3365887ae2e4d9de47" + integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg== + "@types/sjcl@^1.0.28": version "1.0.28" resolved "https://registry.yarnpkg.com/@types/sjcl/-/sjcl-1.0.28.tgz#4693eb6943e385e844a70fb25b4699db286c7214" diff --git a/chatto/src/main/resources/static/js/bundle.js b/chatto/src/main/resources/static/js/bundle.js index bbcead7..a444e75 100644 --- a/chatto/src/main/resources/static/js/bundle.js +++ b/chatto/src/main/resources/static/js/bundle.js @@ -509,14 +509,17 @@ class ChatView { log.info('ChatView: updating view'); let html = ""; data.forEach((vm) => { - html += this._messageSendTemplate(vm); + const vmTemp = vm; + vmTemp.message = md.render(vm.message); + $(this._element).append(DOMPurify.sanitize(this._messageSendTemplate(vmTemp))); + // html += this._messageSendTemplate(vm); }); /** Very Important!!! * Sanitizing HTML before displaying on webpage to prevent XSS attacks!! */ - html = DOMPurify.sanitize(md.render(html)); - this._element.innerHTML = html; - log.debug(this._element.innerHTML); + // html = DOMPurify.sanitize(md.render(html)); + // this._element.innerHTML = html; + // log.debug(this._element.innerHTML); } } exports.ChatView = ChatView; @@ -624,4 +627,4 @@ class ChatMessageViewModel { exports.ChatMessageViewModel = ChatMessageViewModel; },{}]},{},[3]) -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Vzci9sb2NhbC9saWIvbm9kZV9tb2R1bGVzL3dhdGNoaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJ0cy9zcmMvY29udHJvbGxlci9DaGF0Q29udHJvbGxlci50cyIsInRzL3NyYy9jb250cm9sbGVyL1VzZXJDb250cm9sbGVyLnRzIiwidHMvc3JjL21haW4udHMiLCJ0cy9zcmMvbW9kZWwvQ2hhdE1vZGVsLnRzIiwidHMvc3JjL21vZGVsL0NoYXRNb2RlbEhlbHBlci50cyIsInRzL3NyYy9tb2RlbC9GZXRjaEVycm9ySGFuZGxlci50cyIsInRzL3NyYy9tb2RlbC9Vc2VyTW9kZWwudHMiLCJ0cy9zcmMvc2VydmljZS9TSkNMRW5jcnlwdGlvblNlcnZpY2UudHMiLCJ0cy9zcmMvc2luZ2xldG9uL0pzb25BUEkudHMiLCJ0cy9zcmMvdGVtcGxhdGUvVGVtcGxhdGVGYWN0b3J5LnRzIiwidHMvc3JjL3ZpZXcvQ2hhdFZpZXcudHMiLCJ0cy9zcmMvdmlldy9Vc2VyVmlldy50cyIsInRzL3NyYy92aWV3bW9kZWwvQWN0aXZlVXNlclZpZXdNb2RlbC50cyIsInRzL3NyYy92aWV3bW9kZWwvQ2hhdE1lc3NhZ2VWaWV3TW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztBQ0NBLGtDQUErQjtBQUMvQiw4QkFBMkI7QUFDM0IsZ0NBQTZCO0FBQzdCLDRCQUF5QjtBQUd6Qiw0RUFBeUU7QUFJekUsT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AgICAgICAgICAgLy8gICAgIH0pXG4gICAgICAgICAgICAgICAgLy8gYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhOiBDaGF0TWVzc2FnZURUT1tdID0gYXdhaXQgdGhpcy5nZXRBbGxNZXNzYWdlc0FqYXgodXNlck5hbWUpO1xuICAgICAgICAgICAgICAgIHJldHVybiBkYXRhLm1hcCh2bSA9PiB0aGlzLnRvQ2hhdE1lc3NhZ2VWTSh2bSwgcGFzc3BocmFzZSkpO1xuXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OiB7XG4gICAgICAgICAgICAgICAgLy8gdGhpcy5nZXROZXdNZXNzYWdlc0FqYXgodXNlck5hbWUsIGxhc3RNZXNzYWdlVGltZSlcbiAgICAgICAgICAgICAgICAvLyAgICAgLnRoZW4oKGRhdGE6IENoYXRNZXNzYWdlRFRPW10pID0+IHtcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgIGxvZy5kZWJ1ZyhgU3ViamVjdDogcmVjZWl2ZWQgbmV3IG1lc3NhZ2VzYCk7XG4gICAgICAgICAgICAgICAgLy8gICAgICAgICByZXR1cm4gZGF0YS5tYXAodm0gPT4gdGhpcy50b0NoYXRNZXNzYWdlVk0odm0sIHBhc3NwaHJhc2UpKTtcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgIC8vIGNoYXRNb2RlbC5zZXRVc2VyTWVzc2FnZXModXNlck5hbWUsIGNoYXRNZXNzYWdlVk1zKTtcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgIC8vIHRoaXMuc3RhdGUgPSBkYXRhO1xuICAgICAgICAgICAgICAgIC8vICAgICAgICAgLy8gY2hhdE1vZGVsLm5vdGlmeSgpO1xuICAgICAgICAgICAgICAgIC8vICAgICB9KVxuICAgICAgICAgICAgICAgIC8vIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNvbnN0IGRhdGE6IENoYXRNZXNzYWdlRFRPW10gPSBhd2FpdCB0aGlzLmdldE5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m5vdGlmeSgpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGxvZy5lcnJvcignQXV0aCB0b2tlbiBpcyBudWxsJyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBhc3luYyBnZXRBY3RpdmVVc2Vyc0FqYXgoYXV0aFRva2VuMjogc3RyaW5nLCBVUkw6IHN0cmluZyk6IFByb21pc2U8YW55PiB7XG4gICAgICAgIGxldCBoZWFkZXJzID0gbmV3IEhlYWRlcnMoKTtcbiAgICAgICAgLy8gaGVhZGVycy5hcHBlbmQoJ0F1dGhvcml6YXRpb24nLCBiYXNpY0F1dGhUb2tlbik7XG4gICAgICAgIGhlYWRlcnMuYXBwZW5kKCdYLUFVVEgtVE9LRU4nLCBhdXRoVG9rZW4yKTtcbiAgICAgICAgbGV0IHJlc3BvbnNlID0gYXdhaXQgZmV0Y2goSnNvbkFQSS5BQ1RJVkVfVVNFUlNfR0VULCB7XG4gICAgICAgICAgICBtZXRob2Q6ICdHRVQnLFxuICAgICAgICAgICAgaGVhZGVyczogaGVhZGVyc1xuICAgICAgICB9KTtcbiAgICAgICAgY29uc29sZS5sb2cocmVzcG9uc2UuY2xvbmUoKSk7XG4gICAgICAgIGlmIChmZXRjaEVycm9ySGFuZGxlcihyZXNwb25zZS5jbG9uZSgpKSkge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgbGV0IGRhdGEgPSBhd2FpdCByZXNwb25zZS5qc29uKCk7XG4gICAgICAgIC8vIHJldHVybiBkYXRhO1xuICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgICAgaWYgKGRhdGEgIT0gbnVsbClcbiAgICAgICAgICAgICAgICByZXNvbHZlKGRhdGEpXG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgcmVqZWN0KCdSZXNwb25zZSBkYX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AgIGlmIChwYXNzcGhyYXNlID09ICcnIHx8IHBhc3NwaHJhc2UgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIC8vIGFsZXJ0KCdQbGVhc2UgaW5wdXQgcGFzc3BocmFzZScpXG4gICAgICAgICAgICAgICAgLy8gYWxlcnRpZnkuZXJyb3IoJ1BsZWFzZSBlbnRlciBhIHBhc3NwaHJhc2UnKTtcbiAgICAgICAgICAgICAgICBsb2cuZXJyb3IoJ3Bhc3NwaHJhc2UgaXMgZW1wdHkgb3IgbnVsbCcpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGN1cnJlbnRbMF0uY2xhc3NOYW1lID0gY3VycmVudFswXS5jbGFzc05hbWUucmVwbGFjZShcIiBhY3RpdmVcIiwgXCJcIik7XG5cbiAgICAgICAgfVxuICAgICAgICAvLyBBZGQgdGhlIGFjdGl2ZSBjbGFzcyB0byB0aGUgY3VycmVudC9jbGlja2VkIGJ1dHRvblxuICAgICAgICBlbHNlIGlmIChjdXJyZW50Lmxlbmd0aCA9PSAwKSB7XG4gICAgICAgICAgICBsZXQgZWxlbSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdwYXNzcGhyYXNlLWluaXRpYWwnKSBhcyBhbnk7XG4gICAgICAgICAgICBpZihlbGVtID09IG51bGwpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgbG9nLmVycm9yKCdwYXNzcGhyYXNlSW5wdXQgZWxlbWVudCByZWZlcmVuY2UgaXMgbnVsbCcpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBhc3NwaHJhc2UgPSBlbGVtLnZhbHVlO1xuICAgICAgICAgICAgaWYgKHBhc3NwaHJhc2UgPT0gJycgfHwgcGFzc3BocmFzZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgLy8gICAgIC8vIGFsZXJ0KCdQbGVhc2UgaW5wd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VxuICAgICAgICAgICAgICAgIC8vIGFsZXJ0aWZ5LmVycm9yKCdQbGVhc2UgZW50ZXIgYSBwYXNzcGhyYXNlJyk7XG4gICAgICAgICAgICAgICAgbG9nLmVycm9yKCdwYXNzcGhyYXNlIGlzIGVtcHR5IG9yIG51bGwnKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjdXJyZW50WzBdLmNsYXNzTmFtZSA9IGN1cnJlbnRbMF0uY2xhc3NOYW1lLnJlcGxhY2UoXCIgYWN0aXZlXCIsIFwiXCIpO1xuXG4gICAgICAgIH1cbiAgICAgICAgLy8gQWRkIHRoZSBhY3RpdmUgY2xhc3MgdG8gdGhlIGN1cnJlbnQvY2xpY2tlZCBidXR0b25cbiAgICAgICAgZWxzZSBpZiAoY3VycmVudC5sZW5ndGggPT0gMCkge1xuICAgICAgICAgICAgbGV0IGVsZW0gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgncGFzc3BocmFzZS1pbml0aWFsJykgYXMgYW55O1xuICAgICAgICAgICAgaWYoZWxlbSA9PSBudWxsKVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGxvZy5lcnJvcigncGFzc3BocmFzZUlucHV0IGVsZW1lbnQgcmVmZXJlbmNlIGlzIG51bGwnKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwYXNzcGhyYXNlID0gZWxlbS52YWx1ZTtcbiAgICAgICAgICAgIGlmIChwYXNzcGhyYXNlID09ICcnIHx8IHBhc3NwaHJhc2UgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIC8vICAgICAvLyBhbGVydCgnUGxlYXNlIGlucHV0IHBhc3NwaHJhc2UnKVxuICAgICAgICAgICAgICAgIC8vICAgICAvLyBhbGVydGlmeS5lcnJvcignUGxlYXNlIGVudGVyIGEgcGFzc3BocmFzZScpO1xuICAgICAgICAgICAgICAgIGxvZy5lcnJvc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