Commit 2f6852f
committed
fix: update mtime for generated files after unpacking
This is the unpacking half of #16237
Updating mtime for all files might not be worthy as crate published
after 1.54 should all have the deterministic mtime for non-generated
files, except those did manual upload.
This patch is aimed at
fixing the "regression" of vendor direct extraction,
rather than a complete fix of the non-deterministic mtime.
Also there are workarounds,
so the workflow is not completely blocked.
Since Cargo had a couple CVEs around tar and unpack,
I separate the mtime update logic from the main unpack logic,
so that each function's intent is clearer.
Hope it won't introduce new vulnerability1 parent c3fbb4d commit 2f6852f
File tree
3 files changed
+24
-2
lines changed- src/cargo/sources/registry
- tests/testsuite
3 files changed
+24
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
| 638 | + | |
638 | 639 | | |
639 | 640 | | |
640 | 641 | | |
| |||
679 | 680 | | |
680 | 681 | | |
681 | 682 | | |
| 683 | + | |
682 | 684 | | |
683 | 685 | | |
684 | 686 | | |
| |||
1104 | 1106 | | |
1105 | 1107 | | |
1106 | 1108 | | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4656 | 4656 | | |
4657 | 4657 | | |
4658 | 4658 | | |
4659 | | - | |
4660 | 4659 | | |
4661 | 4660 | | |
4662 | 4661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2122 | 2122 | | |
2123 | 2123 | | |
2124 | 2124 | | |
2125 | | - | |
2126 | 2125 | | |
2127 | 2126 | | |
2128 | 2127 | | |
| |||
0 commit comments