Commit b3bab4b
Han Wang
fix(pt_expt): use weights_only=True when reading
`Backend.detect_backend_by_model` and `pt_expt.DeepEval._load_pt`
deserialised `.pt` files with `weights_only=False`, which allows
arbitrary code execution from a malicious checkpoint. The training
resume path (training.py:712) already uses `weights_only=True`; align
the two new sites with that convention.
Reported by chatgpt-codex-connector on PR #5423..pt checkpoints1 parent 7158830 commit b3bab4b
2 files changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| |||
0 commit comments