altweb-context 1.0.2 → 1.0.3

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.
@@ -6926,6 +6926,12 @@ function base64urlDecode(str) {
6926
6926
  const binary = atob(base644);
6927
6927
  return Uint8Array.from(binary, (c) => c.charCodeAt(0));
6928
6928
  }
6929
+ function concatBytes(a, b2) {
6930
+ const out = new Uint8Array(a.length + b2.length);
6931
+ out.set(a, 0);
6932
+ out.set(b2, a.length);
6933
+ return out;
6934
+ }
6929
6935
 
6930
6936
  // ../core/src/crypto/key-derivation.ts
6931
6937
  var PBKDF2_ITERATIONS = 6e5;
@@ -27632,7 +27638,8 @@ async function decodePage(hash2, password) {
27632
27638
  let verified2 = false;
27633
27639
  let fingerprint2;
27634
27640
  if (envelope.s && envelope.pk) {
27635
- verified2 = await verify(blocksCompressed, envelope.s, envelope.pk);
27641
+ const signedBytes = concatBytes(metaCompressed, blocksCompressed);
27642
+ verified2 = await verify(signedBytes, envelope.s, envelope.pk);
27636
27643
  if (verified2) {
27637
27644
  fingerprint2 = await computeFingerprint(envelope.pk);
27638
27645
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "altweb-context",
3
3
  "mcpName": "software.altweb/altweb-context",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "description": "MCP server that loads ALTWEB signed context capsules into AI agents — verifies first, refuses unsigned, tampered, or untrusted context by default. Verify before you inject.",
6
6
  "type": "module",
7
7
  "license": "AGPL-3.0-or-later",