Commit 02d2d7e
committed
Handle missing bridge port and path mapping
Main: add a guard that logs and returns if the bridge port is unavailable, avoiding attempts to load the renderer URL with an undefined port. Bridge module: when a route isn't mapped, join the requested pathname with the server cwd and normalize it (instead of always resolving) before the isUnderRootAsync check. This ensures paths are handled consistently and prevents incorrect resolution/permissions checks that could allow escapes from the expected root.1 parent 243e392 commit 02d2d7e
2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
722 | 726 | | |
723 | 727 | | |
724 | 728 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
134 | 136 | | |
135 | | - | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
0 commit comments