summaryrefslogtreecommitdiff
path: root/tests/processors
diff options
context:
space:
mode:
authorDavid Cramer <dcramer@gmail.com>2012-05-15 12:20:51 -0700
committerDavid Cramer <dcramer@gmail.com>2012-05-15 12:20:51 -0700
commit20143b5a4a7bc3f8d3377d6eace3d1afe25515b6 (patch)
treeae7311c03f2570c3b8be92509c4f47f3f72e7603 /tests/processors
parentcef6d9da3432178a4132ece513a77995d7ff44f1 (diff)
downloadraven-20143b5a4a7bc3f8d3377d6eace3d1afe25515b6.tar.gz
Safely handle empty value pieces in querystrings
Diffstat (limited to 'tests/processors')
-rw-r--r--tests/processors/tests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/processors/tests.py b/tests/processors/tests.py
index 7286936..45d0fe7 100644
--- a/tests/processors/tests.py
+++ b/tests/processors/tests.py
@@ -103,6 +103,20 @@ class SantizePasswordsProcessorTest(TestCase):
http = result['sentry.interfaces.Http']
self.assertEquals(http['query_string'], 'foo=bar&password=%(m)s&the_secret=%(m)s&a_password_here=%(m)s' % dict(m=proc.MASK))
+ def test_querystring_as_string_with_partials(self):
+ data = {
+ 'sentry.interfaces.Http': {
+ 'query_string': 'foo=bar&password&baz=bar',
+ }
+ }
+
+ proc = SanitizePasswordsProcessor(Mock())
+ result = proc.process(data)
+
+ self.assertTrue('sentry.interfaces.Http' in result)
+ http = result['sentry.interfaces.Http']
+ self.assertEquals(http['query_string'], 'foo=bar&password&baz=bar' % dict(m=proc.MASK))
+
def test_sanitize_credit_card(self):
proc = SanitizePasswordsProcessor(Mock())
result = proc.sanitize('foo', '4242424242424242')