File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
python/ql/test/experimental/dataflow/tainttracking/customSanitizer Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ test_taint
3333| test_logical.py:126 | ok | test_nesting_not_with_and_true | s |
3434| test_logical.py:128 | ok | test_nesting_not_with_and_true | s |
3535| test_logical.py:137 | fail | test_with_return | s |
36+ | test_logical.py:146 | fail | test_with_exception | s |
3637isSanitizer
3738| TestTaintTrackingConfiguration | test.py:21:39:21:39 | ControlFlowNode for s |
3839| TestTaintTrackingConfiguration | test.py:50:10:50:29 | ControlFlowNode for emulated_escaping() |
Original file line number Diff line number Diff line change @@ -137,6 +137,14 @@ def test_with_return():
137137 ensure_not_tainted (s )
138138
139139
140+ def test_with_exception ():
141+ s = TAINTED_STRING
142+
143+ if not is_safe (s ):
144+ raise Exception ("unsafe" )
145+
146+ ensure_not_tainted (s )
147+
140148# Make tests runable
141149
142150test_basic ()
@@ -146,3 +154,7 @@ def test_with_return():
146154test_nesting_not ()
147155test_nesting_not_with_and_true ()
148156test_with_return ()
157+ try :
158+ test_with_exception ()
159+ except :
160+ pass
You can’t perform that action at this time.
0 commit comments