only include csrf if it's going to be used. This fixes view_video using up all ram sending a video file
parent
6db9a78dab
commit
c1b8105c0e
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue