Commit a88d1b8
* gh-143010: Prevent a TOCTOU issue by gh-143010: Prevent a TOCTOU issue by only calling open once
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.
Co-authored-by: sobolevn <mail@sobolevn.me>
1 parent 700e9fa commit a88d1b8
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 | |
|---|---|---|---|
| |||
2181 | 2181 | | |
2182 | 2182 | | |
2183 | 2183 | | |
2184 | | - | |
2185 | | - | |
2186 | | - | |
2187 | | - | |
2188 | | - | |
| 2184 | + | |
2189 | 2185 | | |
2190 | 2186 | | |
2191 | 2187 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments