diff --git a/web/index.php b/web/index.php index 52152d7fe..c4a44afbf 100644 --- a/web/index.php +++ b/web/index.php @@ -230,6 +230,7 @@ if ( ( $request != 'control' ) && //( $view != 'frames' ) && // big html can overflow ob ( $view != 'archive' ) // returns data + && ( (!isset($_SERVER['CONTENT_TYPE']) or ($_SERVER['CONTENT_TYPE'] != 'application/csp-report')) ) ) { require_once('includes/csrf/csrf-magic.php'); #ZM\Debug("Calling csrf_check with the following values: \$request = \"$request\", \$view = \"$view\", \$action = \"$action\""); diff --git a/web/js/logger.js b/web/js/logger.js index 437810b23..050b2cecb 100644 --- a/web/js/logger.js +++ b/web/js/logger.js @@ -54,7 +54,6 @@ function logReport( level, message, file, line ) { /* eslint-disable no-caller */ if ( arguments && arguments.callee && arguments.callee.caller && arguments.callee.caller.caller && arguments.callee.caller.caller.name ) { message += ' - '+arguments.callee.caller.caller.name+'()'; - //console.log("arguments"); } var data = { @@ -75,7 +74,7 @@ function logReport( level, message, file, line ) { if ( line ) data.line = line; - $j.getJSON(thisUrl, data); + $j.post(thisUrl, data, null, 'json'); } function Panic(message) { diff --git a/web/skins/classic/views/js/watch.js b/web/skins/classic/views/js/watch.js index 7ce0dcd7b..f53e74c78 100644 --- a/web/skins/classic/views/js/watch.js +++ b/web/skins/classic/views/js/watch.js @@ -1,6 +1,5 @@ var streamCmdTimer = null; var streamStatus; -var auth_hash; var alarmState = STATE_IDLE; var lastAlarmState = STATE_IDLE; var backBtn = $j('#backBtn'); @@ -119,8 +118,7 @@ function changeScale() { streamImg.width(newWidth); streamImg.height(newHeight); - streamImg.src = ''; // Some browsers need it to be cleared first - streamImg.src = newSrc; + streamImg.attr('src', newSrc); } else { console.error('No element found for liveStream'+monitorId); } @@ -282,7 +280,7 @@ function getStreamCmdResponse(respObj, respText) { if ( streamImg ) { var oldSrc = streamImg.attr('src'); var newSrc = oldSrc.replace(/auth=\w+/i, 'auth='+streamStatus.auth); - streamImg.src = newSrc; + streamImg.attr('src', newSrc); } table.bootstrapTable('refresh'); } // end if have a new auth hash @@ -300,8 +298,8 @@ function getStreamCmdResponse(respObj, respText) { var oldSrc = streamImg.attr('src'); var newSrc = oldSrc.replace(/rand=\d+/i, 'rand='+Math.floor((Math.random() * 1000000) )); - streamImg.src = newSrc; - console.log('Changing livestream src to ' + streamImg.src); + streamImg.attr('src', newSrc); + console.log('Changing livestream src to ' + newSrc); } else { console.log('Unable to find streamImg liveStream'); }