Commit 2de873e
committed
review: address Copilot pickups on JavaScriptSolidServer#442
Six small but real fixes from the first review pass.
1. storage.write created the file with the process umask (often 0644)
and only then chmod'd to the requested mode. Race window where
another local process could read freshly created secret material
before chmod ran. Pass `mode` to fs.writeFile at create time so
the file is *born* with the right perms; keep the chmod afterward
as belt-and-braces for the overwrite case (Node only honours mode
at create time, not on overwrite).
2. createRootPodStructure's docstring said the secret was "never
returned", but the returned ownerKey object includes secretHex
and secretKeyMultibase. Tightened the doc to match reality —
"callers must not log the secret" — and noted why we keep the
internal representation full (tests, future one-shot signing).
3. Single-user onReady built the same `keyPath` string in both
branches of an isRootPod ternary. Collapsed to one expression
(podUri already carries the trailing slash + name segment).
4. docs/provision-keys.md intro referenced "JavaScriptSolidServer#427 / JavaScriptSolidServer#437" — but JavaScriptSolidServer#427
is the unrelated ACL-portability umbrella. Just JavaScriptSolidServer#437.
5. docs backup example only showed the root-pod path. Added the
named-pod variants for both the HTTP curl backup and the on-disk
cp backup, since the named-pod layout is the multi-user case.
6. Updated storage.write JSDoc to document the new `options.mode`
argument with the rationale.
840/840 tests pass.1 parent 79f128c commit 2de873e
3 files changed
Lines changed: 59 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
120 | 126 | | |
121 | 127 | | |
122 | | - | |
123 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
124 | 133 | | |
125 | 134 | | |
126 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
861 | 861 | | |
862 | 862 | | |
863 | 863 | | |
864 | | - | |
| 864 | + | |
865 | 865 | | |
866 | | - | |
867 | | - | |
868 | | - | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
869 | 870 | | |
870 | 871 | | |
871 | 872 | | |
| |||
1008 | 1009 | | |
1009 | 1010 | | |
1010 | 1011 | | |
1011 | | - | |
1012 | | - | |
1013 | | - | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
1014 | 1019 | | |
1015 | 1020 | | |
1016 | 1021 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
81 | 93 | | |
82 | 94 | | |
83 | 95 | | |
84 | 96 | | |
85 | 97 | | |
86 | 98 | | |
87 | 99 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
92 | 118 | | |
93 | 119 | | |
94 | 120 | | |
95 | 121 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | 122 | | |
101 | 123 | | |
102 | 124 | | |
| |||
0 commit comments