Commit 536bdcc
committed
fix: address CodeRabbit review feedback on #3370
Hardening fixes from CodeRabbit review (verified against code, false
positives rejected):
Security / stability:
- videoCallWindow/ipc.ts: validate URL protocol (http/https) before the
g.co external-open escape hatch (was reachable via ftp://g.co/...);
tighten host match to exact g.co / *.g.co (was overmatching evilg.co);
guard getRootWindow() rejection in restoreServerViewHandler so teardown
can't produce an unhandled rejection (display-media restore still runs).
- serverView/index.ts: gate the 'Permission request' debug log behind
NODE_ENV==='development' (was logging payloads in production); wrap
isProtocolAllowed() in try/catch so the openExternal permission callback
always fires even on malformed URLs.
- telephony/main.ts: handle shell.openExternal() promise rejection with
.catch(); attach 'error' listeners to gnome/kcmshell spawns before
unref() so a missing executable can't throw unhandled.
- screenSharing/serverViewScreenSharing.ts: reset cached init state on
provider init failure so later requests can retry instead of reusing a
rejected promise until restart.
- telephony/dialpad.ts: guard webContents.send against a destroyed handle.
Data integrity:
- PersistableValues.ts: preserve persisted telephonyGlobalShortcutConfig
in the >=4.14.0 migration instead of resetting it to defaults on upgrade.
UI / i18n:
- TelephonyDiagnostics.tsx: catch rejected get-diagnostics IPC and set a
controlled empty state instead of leaking an unhandled rejection.
- i18n/ar, i18n/es: split reservedAccelerator into reservedByApp /
reservedByOS to match the runtime keys (other locales fall back to en).
QA tooling / installer:
- validate-flows.mjs: enforce qase_id PRESENCE (key may be null per the
flow contract) rather than truthiness, which would have rejected every
existing flow; handle CRLF frontmatter delimiters.
- export-qase-csv.mjs: normalize CRLF on read for cross-platform parsing.
- package.json: declare yaml as a devDependency (used by export-qase-csv).
- msiProjectCreated.js: fail fast on telephony RegWrite errors in the
WriteTelephonyCapabilities custom action.
Tests:
- main.spec.ts: mock shell.openExternal as a resolved promise.
- dialpad.spec.ts / deepLinks/main.spec.ts: add isDestroyed() to
webContents mocks for the new destroyed-handle guard.
- TelephonyGlobalShortcut.spec.tsx: add configurable:true so the
process.platform restore in afterAll doesn't throw.
Rejected:
- Rename telephony/main.spec.ts -> main.main.spec.ts: false positive.
jest testMatch already routes src/**/main.spec.ts to the main-process
project; the rename would break discovery.
Verified: tsc clean, lint clean, full suite 456 passed / 2 skipped / 0
failed, validate-flows passes all 14 telephony flows.1 parent 070cd27 commit 536bdcc
17 files changed
Lines changed: 114 additions & 33 deletions
File tree
- build
- qa/scripts
- src
- app
- deepLinks
- i18n
- screenSharing
- telephony
- __tests__
- ui
- components/SettingsView/features
- main/serverView
- videoCallWindow
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
227 | 232 | | |
228 | 233 | | |
229 | 234 | | |
| |||
239 | 244 | | |
240 | 245 | | |
241 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
242 | 252 | | |
243 | 253 | | |
244 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
226 | 230 | | |
227 | 231 | | |
228 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| |||
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
| 504 | + | |
503 | 505 | | |
504 | 506 | | |
505 | 507 | | |
| |||
655 | 657 | | |
656 | 658 | | |
657 | 659 | | |
| 660 | + | |
658 | 661 | | |
659 | 662 | | |
660 | 663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
| 302 | + | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
0 commit comments