only include csrf if it's going to be used. This fixes view_video using up all ram sending a video file

pull/1941/head
Isaac Connor 2017-06-26 14:23:54 -04:00
parent 6db9a78dab
commit c1b8105c0e
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,6 @@ else
require_once( 'includes/lang.php' );
require_once( 'includes/functions.php' );
require_once( 'includes/csrf/csrf-magic.php' );
# Add Cross domain access headers
CORSHeaders();
@ -178,6 +177,7 @@ isset($request) || $request = NULL;
isset($action) || $action = NULL;
if ( ZM_ENABLE_CSRF_MAGIC && $action != 'login' && $action != 'view_video' ) {
require_once( 'includes/csrf/csrf-magic.php' );
Logger::Debug("Calling csrf_check with the following values: \$request = \"$request\", \$view = \"$view\", \$action = \"$action\"");
csrf_check();
}