From 38b1e0a35e42e4d2e1ff99afc598725c5f7f2a6a Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Tue, 30 Jan 2018 12:51:53 -0800 Subject: better sanitize window location in error messages --- src/static/js/pad_utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/static/js/pad_utils.js b/src/static/js/pad_utils.js index b83f21cf..9c1277a0 100644 --- a/src/static/js/pad_utils.js +++ b/src/static/js/pad_utils.js @@ -524,7 +524,7 @@ function setupGlobalExceptionHandler() { $("#editorloadingbox").css("padding", "10px"); $("#editorloadingbox").css("padding-top", "45px"); $("#editorloadingbox").html("
An error occurred
The error was reported with the following id: '" + errorId + "'

Please press and hold Ctrl and press F5 to reload this page, if the problem persists please send this error message to your webmaster:
'" - + "ErrorId: " + errorId + "
URL: " + window.location.href + "
UserAgent: " + userAgent + "
" + msg + " in " + url + " at line " + linenumber + "'
"); + + "ErrorId: " + errorId + "
URL: " + padutils.escapeHtml(window.location.href) + "
UserAgent: " + userAgent + "
" + msg + " in " + url + " at line " + linenumber + "'"); } //send javascript errors to the server -- cgit v1.2.3