Commit a6cfdb5
gh-143010: Prevent a TOCTOU issue by only calling open once (GH-143011)
RDM: per AZero13's research the 'x' option did not exist when this code was written, This
modernization can thus drop the fd trick in _create_carefully and just use open with 'x' to achieve the same goal more securely.
(cherry picked from commit a88d1b8)
Co-authored-by: AZero13 <gfunni234@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
1 parent 931c4d6 commit a6cfdb5
File tree
2 files changed
+2
-5
lines changed- Lib
- Misc/NEWS.d/next/Library
2 files changed
+2
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2183 | 2183 | | |
2184 | 2184 | | |
2185 | 2185 | | |
2186 | | - | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
| 2186 | + | |
2191 | 2187 | | |
2192 | 2188 | | |
2193 | 2189 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments