summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Error.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Error.pm')
-rw-r--r--Bugzilla/Error.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm
index 0c471125d..60e7837de 100644
--- a/Bugzilla/Error.pm
+++ b/Bugzilla/Error.pm
@@ -31,6 +31,8 @@ use base qw(Exporter);
use Bugzilla::Constants;
use Bugzilla::WebService::Constants;
use Bugzilla::Util;
+
+use Carp;
use Date::Format;
# We cannot use $^S to detect if we are in an eval(), because mod_perl
@@ -50,6 +52,12 @@ sub _throw_error {
$vars ||= {};
$vars->{error} = $error;
+ # Don't show function arguments, in case they contain confidential data.
+ local $Carp::MaxArgNums = -1;
+ # Don't show the error as coming from Bugzilla::Error, show it as coming
+ # from the caller.
+ local $Carp::CarpInternal{'Bugzilla::Error'} = 1;
+ $vars->{traceback} = Carp::longmess();
# Make sure any transaction is rolled back (if supported).
# If we are within an eval(), do not roll back transactions as we are