dsh-mini-utility-dock 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.en.md +5 -0
- package/CHANGELOG.md +5 -0
- package/dist/guard.js +7 -6
- package/package.json +1 -1
package/CHANGELOG.en.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.6 - 2026-09-20
|
|
4
|
+
|
|
5
|
+
- Fix the `allowRemoteHost` note in `dist/guard.js`: it read "stop being admitted", the opposite of what the code does — that mode skips both checks, so it admits them. The JSDoc was already right; only this inline comment was inverted.
|
|
6
|
+
- The fragment's bytes change, so consumers must re-run `guard:sync` and raise their pin to 0.1.6.
|
|
7
|
+
|
|
3
8
|
## 0.1.5 - 2026-09-17
|
|
4
9
|
|
|
5
10
|
- Documentation maintenance: README and CHANGELOG cleanup. Fragments and command behavior are unchanged, so consumer pins need no update.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.6 - 2026-09-20
|
|
4
|
+
|
|
5
|
+
- 修正 `dist/guard.js` 里 `allowRemoteHost` 的说明文字:原文写作「不再被放行」,与代码相反——开启该模式时这两项检查被跳过,即被放行。JSDoc 一直是对的,只有这处行内注释写反。
|
|
6
|
+
- 该片段的字节因此变化,消费仓需重新运行 `guard:sync` 并把 pin 升到 0.1.6。
|
|
7
|
+
|
|
3
8
|
## 0.1.5 - 2026-09-17
|
|
4
9
|
|
|
5
10
|
- 文档维护:README 与 CHANGELOG 的整理,片段与命令行为不变,故无需改动消费仓的 pin。
|
package/dist/guard.js
CHANGED
|
@@ -134,12 +134,13 @@ const bindGuard = ({ currentPort, respond, allowRemoteHost, policy } = {}) => {
|
|
|
134
134
|
return deny(res, 'unknown_peer')
|
|
135
135
|
}
|
|
136
136
|
// `allowRemoteHost` buys exactly one thing: an off-loopback peer AND an
|
|
137
|
-
// off-loopback Host stop being
|
|
138
|
-
//
|
|
139
|
-
//
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
// Host criteria
|
|
137
|
+
// off-loopback Host stop being *rejected* by this guard — both checks below
|
|
138
|
+
// are skipped — because the caller has opted into verifying its own
|
|
139
|
+
// credential per request. Everything else still applies: the Origin check
|
|
140
|
+
// below rejects cross-site traffic in both modes, so the exemption never
|
|
141
|
+
// widens the browser-facing boundary. A plugin that does not pass the
|
|
142
|
+
// predicate never enters this mode, so for it the peer and Host criteria
|
|
143
|
+
// are absolute.
|
|
143
144
|
const remote = fleetAllowed()
|
|
144
145
|
if (!remote && !isLoopbackAddress(peerAddress)) {
|
|
145
146
|
return deny(res, 'non_loopback_peer')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mini-utility-dock",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Canonical fragments and a build-time embedding CLI shared by DSH plugins: the Mini Utility Dock bootstrap for client halves, and the loopback predicates plus the host request guard for host halves.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|