Repository navigation
v1.6.8 — the panel gate is judged by the connection
v1.6.8 — the panel gate is judged by the connection
1.6.7 fixed half of the lockout. The other half was still there: the panel kept answering
origin rejected on Evaluate.
What was wrong
The route compared Origin against http:// + Host literally. The desktop window can send
Origin: http://localhost:<port> while the request itself arrives on 127.0.0.1, and then the
two strings differ even though both name the same machine — so the plugin refused its own panel.
The fix
The gate now decides on req.socket.remoteAddress, the peer address of the connection,
which a remote page cannot influence. Only after that is Origin inspected:
| Connection | Origin | Result |
|---|---|---|
| loopback socket | dsh-app://app |
200 |
| loopback socket | absent / null |
200 |
| loopback socket | http://localhost:<any port> |
200 |
| loopback socket | http://127.0.0.1:<any port> |
200 |
| loopback socket | https://evil.example |
403 |
| non-loopback socket | anything | 403 |
::1 and ::ffff:127.0.0.1 are treated as loopback too.
The three assessment error paths (evaluate, reveal, run-a-plan-step) now go through the same
describeError path as the rest of the panel, so a Chinese user reads 「请求来源不被接受」 instead
of the raw origin rejected string.
Verification
node smoke.mjs— 110 assertions, 0 failures.- An 11-case behavioural gate check drives the real route handler with fake sockets: every case
above passes, including the exact combination 1.6.7 got wrong. node check.mjs— the panel still carries dsh-design-baseline, no host token outside the block.
Installing from this release skips DSH's build-approval step:
dsh plugin --profile <profile> add https://github.com/stallenlu/dsh-disk-cleaner/releases/download/v1.6.8/dsh-disk-cleaner-1.6.8.tgz