1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Remove URL from self host error logs

This commit is contained in:
Hillel Coren 2018-04-16 23:50:45 +03:00
parent b0cb73757a
commit 7b7ee5084f

View File

@ -431,14 +431,12 @@ class Utils
public static function prepareErrorData($context)
{
return [
$data = [
'context' => $context,
'user_id' => Auth::check() ? Auth::user()->id : 0,
'account_id' => Auth::check() ? Auth::user()->account_id : 0,
'user_name' => Auth::check() ? Auth::user()->getDisplayName() : '',
'method' => Request::method(),
'url' => Input::get('url', Request::url()),
'previous' => url()->previous(),
'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',
'locale' => App::getLocale(),
'ip' => Request::getClientIp(),
@ -447,6 +445,15 @@ class Utils
'is_api' => session('token_id') ? 'yes' : 'no',
'db_server' => config('database.default'),
];
if (static::isNinja()) {
$data['url'] = Input::get('url', Request::url());
$data['previous'] = url()->previous();
} else {
$data['url'] = request()->path();
}
return $data;
}
public static function getErrors()