From 2f741d7ad41c0df959bb27597abac5db587f5455 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 5 Sep 2016 21:12:57 +0200 Subject: [PATCH] (crashreport) limit output chunks to 5MB, if we can't find within that area it's very unlikely that it exists in the output. report: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 35997807 bytes) in /usr/local/www/csrf/csrf-magic.php on line 144 --- src/www/csrf/csrf-magic.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/www/csrf/csrf-magic.php b/src/www/csrf/csrf-magic.php index 869edee9e..a4355d2ad 100644 --- a/src/www/csrf/csrf-magic.php +++ b/src/www/csrf/csrf-magic.php @@ -410,7 +410,8 @@ if (function_exists('csrf_startup')) { } // Initialize our handler if ($GLOBALS['csrf']['rewrite']) { - ob_start('csrf_ob_handler'); + // limit output chunks to max 5MB + ob_start('csrf_ob_handler', 5242880); } // Perform check csrf_check();