Commit 88e49031 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(crashreport) limit output chunks to 5MB, if we can't find </head> within that...

(crashreport) limit output chunks to 5MB, if we can't find </head> 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

(cherry picked from commit 2f741d7a)
parent c698c1fc
...@@ -410,7 +410,8 @@ if (function_exists('csrf_startup')) { ...@@ -410,7 +410,8 @@ if (function_exists('csrf_startup')) {
} }
// Initialize our handler // Initialize our handler
if ($GLOBALS['csrf']['rewrite']) { if ($GLOBALS['csrf']['rewrite']) {
ob_start('csrf_ob_handler'); // limit output chunks to max 5MB
ob_start('csrf_ob_handler', 5242880);
} }
// Perform check // Perform check
csrf_check(); csrf_check();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment