Commit a97f298
fix(BA-5978): strip input/ctx from SchemaValidationFailureInfo.errors
Pydantic v2 ErrorDetails carry the raw invalid input value and
validator-specific ctx. Capturing those verbatim leaks sensitive data
(passwords, tokens, …) into HTTP 400 responses / log output and can
include non-JSON-serializable objects.
Per review (#3224372025), strip the input and ctx keys before storing
in SchemaValidationFailureInfo.errors.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d0b7675 commit a97f298
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
230 | 242 | | |
231 | 243 | | |
232 | 244 | | |
| |||
0 commit comments