Commit e7f43fb
committed
fix(mcp): consolidate header sanitization and clean up review findings
- Move sanitization from _get_auth_headers to _execute_with_session boundary
- Replace verbose _DANGEROUS_CHARS literal with frozenset comprehension
- Remove redundant CRLF strip already handled by sanitize_header_value
- Use lazy %-formatting instead of f-strings in logging
- Clarify docstrings for run() Optional new_message and from_config()1 parent b2bc997 commit e7f43fb
3 files changed
Lines changed: 20 additions & 49 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
462 | 464 | | |
463 | 465 | | |
464 | 466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
88 | 54 | | |
89 | 55 | | |
90 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | 166 | | |
171 | 167 | | |
172 | 168 | | |
| |||
204 | 200 | | |
205 | 201 | | |
206 | 202 | | |
207 | | - | |
| 203 | + | |
208 | 204 | | |
209 | 205 | | |
210 | 206 | | |
211 | 207 | | |
212 | | - | |
| 208 | + | |
| 209 | + | |
213 | 210 | | |
214 | 211 | | |
215 | 212 | | |
| |||
444 | 441 | | |
445 | 442 | | |
446 | 443 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | 444 | | |
452 | 445 | | |
453 | 446 | | |
| |||
470 | 463 | | |
471 | 464 | | |
472 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
473 | 470 | | |
474 | 471 | | |
475 | 472 | | |
| |||
611 | 608 | | |
612 | 609 | | |
613 | 610 | | |
614 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
615 | 618 | | |
616 | 619 | | |
617 | 620 | | |
| |||
0 commit comments