Browse Source

Exclude dispatch and dispatch_rpc frames as they contain passwords

pull/44/head
Sandy Carter 10 years ago
parent
commit
f937bd358a
  1. 9
      sentry_logger/odoo_sentry_client.py

9
sentry_logger/odoo_sentry_client.py

@ -120,4 +120,13 @@ class OdooClient(Client):
event_type, data, date, time_spent, extra, stack, public_key, event_type, data, date, time_spent, extra, stack, public_key,
tags, **kwargs) tags, **kwargs)
res['modules'] = dict(res['modules'].items() + self.revnos.items()) res['modules'] = dict(res['modules'].items() + self.revnos.items())
# Sanitize frames from dispatch since they contain passwords
try:
for values in res['exception']['values']:
values['stacktrace']['frames'] = [
f for f in values['stacktrace']['frames']
if f.get('function') not in ['dispatch', 'dispatch_rpc']
]
except KeyError:
pass
return res return res
Loading…
Cancel
Save