Skip to content

Commit b89a351

Browse files
authored
Fix to sanitize disqus shortnames to remove slashes [Security Issue]
Signed-off-by: Max Wu <[email protected]>
1 parent f9cc2ff commit b89a351

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/views/shared/disqus.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var disqus_config = function () {
55
};
66
(function() {
77
var d = document, s = d.createElement('script');
8-
s.src = 'https://<%= disqus %>.disqus.com/embed.js';
8+
s.src = 'https://<%= disqus.replace(/[^A-Za-z0-9]+/g, '') %>.disqus.com/embed.js';
99
s.setAttribute('data-timestamp', +new Date());
1010
(d.head || d.body).appendChild(s);
1111
})();

0 commit comments

Comments
 (0)