Fix for Trac#627: Don't log the parameters in the call stack in case of exception to protect sensitive data.

SVN:trunk[2476]
This commit is contained in:
Denis Flaven
2012-11-28 10:53:43 +00:00
parent b3b19bcaf6
commit a9d17903cf

View File

@@ -373,8 +373,15 @@ class ApplicationInstaller
'percentage-completed' => 100,
);
SetupPage::log_error('An exception occurred: '.$e->getMessage());
SetupPage::log("Stack trace:\n".$e->getTraceAsString());
SetupPage::log_error('An exception occurred: '.$e->getMessage().' at line '.$e->getLine().' in file '.$e->getFile());
$idx = 0;
// Log the call stack, but log the parameters since they may contain passwords or other sensitive data
SetupPage::log("Call stack:");
foreach($e->getTrace() as $aTrace)
{
SetupPage::log("#$idx {$aTrace['file']}({$aTrace['line']}): {$aTrace['function']}(...)");
$idx++;
}
}
return $aResult;
}