@openclaw/zalo 2026.2.19 → 2026.2.21
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.md +0 -132
- package/package.json +1 -1
- package/src/monitor.ts +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,137 +1,5 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 2026.2.19
|
|
4
|
-
|
|
5
|
-
### Changes
|
|
6
|
-
|
|
7
|
-
- Version alignment with core OpenClaw release numbers.
|
|
8
|
-
|
|
9
|
-
## 2026.2.16
|
|
10
|
-
|
|
11
|
-
### Changes
|
|
12
|
-
|
|
13
|
-
- Version alignment with core OpenClaw release numbers.
|
|
14
|
-
|
|
15
|
-
## 2026.2.15
|
|
16
|
-
|
|
17
|
-
### Changes
|
|
18
|
-
|
|
19
|
-
- Version alignment with core OpenClaw release numbers.
|
|
20
|
-
|
|
21
|
-
## 2026.2.14
|
|
22
|
-
|
|
23
|
-
### Changes
|
|
24
|
-
|
|
25
|
-
- Version alignment with core OpenClaw release numbers.
|
|
26
|
-
|
|
27
|
-
## 2026.2.13
|
|
28
|
-
|
|
29
|
-
### Changes
|
|
30
|
-
|
|
31
|
-
- Version alignment with core OpenClaw release numbers.
|
|
32
|
-
|
|
33
|
-
## 2026.2.6-3
|
|
34
|
-
|
|
35
|
-
### Changes
|
|
36
|
-
|
|
37
|
-
- Version alignment with core OpenClaw release numbers.
|
|
38
|
-
|
|
39
|
-
## 2026.2.6-2
|
|
40
|
-
|
|
41
|
-
### Changes
|
|
42
|
-
|
|
43
|
-
- Version alignment with core OpenClaw release numbers.
|
|
44
|
-
|
|
45
|
-
## 2026.2.6
|
|
46
|
-
|
|
47
|
-
### Changes
|
|
48
|
-
|
|
49
|
-
- Version alignment with core OpenClaw release numbers.
|
|
50
|
-
|
|
51
|
-
## 2026.2.4
|
|
52
|
-
|
|
53
|
-
### Changes
|
|
54
|
-
|
|
55
|
-
- Version alignment with core OpenClaw release numbers.
|
|
56
|
-
|
|
57
|
-
## 2026.2.2
|
|
58
|
-
|
|
59
|
-
### Changes
|
|
60
|
-
|
|
61
|
-
- Version alignment with core OpenClaw release numbers.
|
|
62
|
-
|
|
63
|
-
## 2026.1.31
|
|
64
|
-
|
|
65
|
-
### Changes
|
|
66
|
-
|
|
67
|
-
- Version alignment with core OpenClaw release numbers.
|
|
68
|
-
|
|
69
|
-
## 2026.1.30
|
|
70
|
-
|
|
71
|
-
### Changes
|
|
72
|
-
|
|
73
|
-
- Version alignment with core OpenClaw release numbers.
|
|
74
|
-
|
|
75
|
-
## 2026.1.29
|
|
76
|
-
|
|
77
|
-
### Changes
|
|
78
|
-
|
|
79
|
-
- Version alignment with core OpenClaw release numbers.
|
|
80
|
-
|
|
81
|
-
## 2026.1.23
|
|
82
|
-
|
|
83
|
-
### Changes
|
|
84
|
-
|
|
85
|
-
- Version alignment with core OpenClaw release numbers.
|
|
86
|
-
|
|
87
|
-
## 2026.1.22
|
|
88
|
-
|
|
89
|
-
### Changes
|
|
90
|
-
|
|
91
|
-
- Version alignment with core OpenClaw release numbers.
|
|
92
|
-
|
|
93
|
-
## 2026.1.21
|
|
94
|
-
|
|
95
|
-
### Changes
|
|
96
|
-
|
|
97
|
-
- Version alignment with core OpenClaw release numbers.
|
|
98
|
-
|
|
99
|
-
## 2026.1.20
|
|
100
|
-
|
|
101
|
-
### Changes
|
|
102
|
-
|
|
103
|
-
- Version alignment with core OpenClaw release numbers.
|
|
104
|
-
|
|
105
|
-
## 2026.1.17-1
|
|
106
|
-
|
|
107
|
-
### Changes
|
|
108
|
-
|
|
109
|
-
- Version alignment with core OpenClaw release numbers.
|
|
110
|
-
|
|
111
|
-
## 2026.1.17
|
|
112
|
-
|
|
113
|
-
### Changes
|
|
114
|
-
|
|
115
|
-
- Version alignment with core OpenClaw release numbers.
|
|
116
|
-
|
|
117
|
-
## 2026.1.16
|
|
118
|
-
|
|
119
|
-
### Changes
|
|
120
|
-
|
|
121
|
-
- Version alignment with core OpenClaw release numbers.
|
|
122
|
-
|
|
123
|
-
## 2026.1.15
|
|
124
|
-
|
|
125
|
-
### Changes
|
|
126
|
-
|
|
127
|
-
- Version alignment with core OpenClaw release numbers.
|
|
128
|
-
|
|
129
|
-
## 2026.1.14
|
|
130
|
-
|
|
131
|
-
### Changes
|
|
132
|
-
|
|
133
|
-
- Version alignment with core OpenClaw release numbers.
|
|
134
|
-
|
|
135
3
|
## 0.1.0
|
|
136
4
|
|
|
137
5
|
### Features
|
package/package.json
CHANGED
package/src/monitor.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
readJsonBodyWithLimit,
|
|
7
7
|
registerWebhookTarget,
|
|
8
8
|
rejectNonPostWebhookRequest,
|
|
9
|
+
resolveSingleWebhookTarget,
|
|
9
10
|
resolveSenderCommandAuthorization,
|
|
10
11
|
resolveWebhookPath,
|
|
11
12
|
resolveWebhookTargets,
|
|
@@ -195,20 +196,22 @@ export async function handleZaloWebhookRequest(
|
|
|
195
196
|
}
|
|
196
197
|
|
|
197
198
|
const headerToken = String(req.headers["x-bot-api-secret-token"] ?? "");
|
|
198
|
-
const
|
|
199
|
-
|
|
199
|
+
const matchedTarget = resolveSingleWebhookTarget(targets, (entry) =>
|
|
200
|
+
timingSafeEquals(entry.secret, headerToken),
|
|
201
|
+
);
|
|
202
|
+
if (matchedTarget.kind === "none") {
|
|
200
203
|
res.statusCode = 401;
|
|
201
204
|
res.end("unauthorized");
|
|
202
205
|
recordWebhookStatus(targets[0]?.runtime, req.url ?? "<unknown>", res.statusCode);
|
|
203
206
|
return true;
|
|
204
207
|
}
|
|
205
|
-
if (
|
|
208
|
+
if (matchedTarget.kind === "ambiguous") {
|
|
206
209
|
res.statusCode = 401;
|
|
207
210
|
res.end("ambiguous webhook target");
|
|
208
211
|
recordWebhookStatus(targets[0]?.runtime, req.url ?? "<unknown>", res.statusCode);
|
|
209
212
|
return true;
|
|
210
213
|
}
|
|
211
|
-
const target =
|
|
214
|
+
const target = matchedTarget.target;
|
|
212
215
|
const path = req.url ?? "<unknown>";
|
|
213
216
|
const rateLimitKey = `${path}:${req.socket.remoteAddress ?? "unknown"}`;
|
|
214
217
|
const nowMs = Date.now();
|