Commit 23a8ef2
committed
Guard RedactUrlQueryParamsFilter against None args
urllib3.connectionpool records can arrive with record.args set to None when another logging filter (e.g. MLflow's SensitiveQueryParamFilter) redacts the message and nulls args before this filter runs. Iterating None raised TypeError. Guard the tuple branch with an explicit None check.
Also fix a latent typo in the dict-args branch: record.arg[k] should be record.args[k], which would raise AttributeError whenever a record carried dict args.
Fixes #946
Signed-off-by: Jonathan Berthias <jvberthias@gmail.com>1 parent 13e8af4 commit 23a8ef2
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments