@basmilius/apple-companion-link 0.13.1 → 0.13.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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -0
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -495,6 +495,7 @@ var Stream = class extends EncryptionAwareConnection {
495
495
  #decrypt(data) {
496
496
  const header = data.subarray(0, 4);
497
497
  const payloadLength = header.readUintBE(1, 3);
498
+ if (payloadLength < 16) throw new Error(`Encrypted frame payload too short: ${payloadLength} bytes (minimum 16 for auth tag)`);
498
499
  const payload = data.subarray(4, 4 + payloadLength);
499
500
  const authTag = payload.subarray(payload.byteLength - 16);
500
501
  const ciphertext = payload.subarray(0, payload.byteLength - 16);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@basmilius/apple-companion-link",
3
3
  "description": "Implementation of Apple's Companion Link in Node.js.",
4
- "version": "0.13.1",
4
+ "version": "0.13.3",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": {
@@ -45,9 +45,9 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@basmilius/apple-common": "0.13.1",
49
- "@basmilius/apple-encoding": "0.13.1",
50
- "@basmilius/apple-encryption": "0.13.1"
48
+ "@basmilius/apple-common": "0.13.3",
49
+ "@basmilius/apple-encoding": "0.13.3",
50
+ "@basmilius/apple-encryption": "0.13.3"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/bun": "^1.3.11",