Commit e2f389e
committed
fix(interfaces): close a public output leak and three correctness gaps
Findings from a full-branch audit pass.
Security:
- The public form-submit route returned the workflow run's entire `output` to
an anonymous visitor. A form module has no `outputConfigs`, so unlike the
chat path there is nothing redacting it — for an agent block that means
`toolCalls.list`: the literal arguments sent to every tool and the literal
responses. No client consumed it. Dropped from the public contract; the
authenticated in-app response is unchanged.
- The interface share PUT validated the org policy against `authType ?? 'public'`
while `upsertResourceShare` persists `authType ?? stored ?? 'public'`, so a
bare re-enable was checked against the wrong mode in both directions. Now
mirrors the file route, whose comment names this exact bug.
- The public *file* OTP route compared codes with `!==`. The interfaces route
added `safeCompare`; brought the files route up to it.
Correctness:
- A combined name+layout PATCH pre-validated with no `previous`, making the
pre-flight stricter than the write it guards — renaming an interface that
referenced an archived table would 400 on a layout the write accepts.
- `DataRow`'s memo comparator observed `renderCellEditor` unconditionally. That
callback is rebuilt on every keystroke that opens an editor and on every
in-flight save, so every mounted row re-rendered where one needed to. Gated
on the editing row, replacing the gate the editor-injection refactor dropped.
- `CellContent` derives both the overlay and the dimmed cell from the editor's
presence, so "editing with no editor" — a blank, unreadable cell — is
unreachable rather than merely unused.
CI:
- `check:resources` was in package.json but ran nowhere. Added to test-build.
Cleanup: deleted an unused `tableResourceId` and a duplicate
`PendingTagIndicator`; consolidated the interface row mapper and the form
submit-label default onto one definition each; completed a `vi.mock` factory
missing three error classes the route narrows on with `instanceof`; corrected
stale doc references and a comment asserting a Tailwind limitation that
does not exist.1 parent 3cecc86 commit e2f389e
33 files changed
Lines changed: 190 additions & 143 deletions
File tree
- .github/workflows
- apps/sim
- app
- api
- files/public/[token]/otp
- interfaces
- [interfaceId]
- modules/[moduleId]/submit
- public/[token]/modules/[moduleId]/submit
- workspace/[workspaceId]
- home/components/message-content/components/special-tags
- interfaces/[interfaceId]/components
- inspector-field
- module-inspector
- components/form-module-fields
- tables/[tableId]/components/table-grid
- components
- action-row
- execution-status
- resources
- file-view/components/rich-markdown-editor
- interface-view/components
- interface-canvas/components/interface-cell
- interface-preview-grid/components/interface-pane
- table-view
- cells
- hooks/queries
- lib
- api/contracts
- interfaces
- resources
- packages/emcn/src/components/chip-password-input
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | | - | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
42 | 55 | | |
43 | 56 | | |
44 | 57 | | |
45 | 58 | | |
46 | 59 | | |
47 | 60 | | |
48 | 61 | | |
| 62 | + | |
| 63 | + | |
49 | 64 | | |
| 65 | + | |
50 | 66 | | |
51 | 67 | | |
52 | 68 | | |
| |||
61 | 77 | | |
62 | 78 | | |
63 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
64 | 83 | | |
65 | 84 | | |
66 | 85 | | |
| |||
73 | 92 | | |
74 | 93 | | |
75 | 94 | | |
76 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
77 | 99 | | |
78 | 100 | | |
79 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
303 | 306 | | |
304 | 307 | | |
305 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
114 | 123 | | |
115 | 124 | | |
116 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
111 | 119 | | |
112 | | - | |
| 120 | + | |
113 | 121 | | |
114 | 122 | | |
115 | 123 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | 185 | | |
187 | 186 | | |
188 | 187 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
Lines changed: 0 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
124 | 123 | | |
125 | 124 | | |
126 | 125 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 126 | | |
144 | 127 | | |
145 | 128 | | |
| |||
0 commit comments