@orbit-tools/cli 0.27.0 → 0.28.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbit-tools/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"mcpName": "io.github.constellation-works/orbit",
|
|
5
5
|
"description": "npm proxy for the Orbit CLI. Downloads the matching native binary from GitHub Releases on install and forwards all invocations.",
|
|
6
6
|
"bin": {
|
|
@@ -190,13 +190,14 @@ function normalizeTrustedReleaseKeys(trustedKeys) {
|
|
|
190
190
|
}
|
|
191
191
|
const notAfter = key.notAfter || null;
|
|
192
192
|
const revokedAt = key.revokedAt || null;
|
|
193
|
-
// Mirror the shell-side
|
|
193
|
+
// Mirror the shell-side date format check (release_date_number) so a malformed
|
|
194
194
|
// override like notAfter: "next month" fails closed instead of silently
|
|
195
195
|
// becoming "never expires" under lexicographic comparison.
|
|
196
|
-
|
|
196
|
+
// The length check also rejects trailing newlines, which JS's $ permits.
|
|
197
|
+
if (notAfter !== null && (notAfter.length !== 10 || !/^\d{4}-\d{2}-\d{2}$/.test(notAfter))) {
|
|
197
198
|
throw new Error(`trusted release signing key ${key.id} has invalid notAfter: ${notAfter} (expected YYYY-MM-DD)`);
|
|
198
199
|
}
|
|
199
|
-
if (revokedAt !== null && !/^\d{4}-\d{2}-\d{2}$/.test(revokedAt)) {
|
|
200
|
+
if (revokedAt !== null && (revokedAt.length !== 10 || !/^\d{4}-\d{2}-\d{2}$/.test(revokedAt))) {
|
|
200
201
|
throw new Error(`trusted release signing key ${key.id} has invalid revokedAt: ${revokedAt} (expected YYYY-MM-DD)`);
|
|
201
202
|
}
|
|
202
203
|
return {
|