diff --git a/package-lock.json b/package-lock.json index fa45eb40..6b2b603b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -261,9 +261,9 @@ "dev": true }, "@openpgp/web-stream-tools": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/@openpgp/web-stream-tools/-/web-stream-tools-0.0.6.tgz", - "integrity": "sha512-U2Ujy4GUwz315W2QfleOWFnlvXTGz2Fjt4mg/nATedruT3EbIWjWzw4qfbaIvnBHjaVIijltsiESuNxIFRdHkw==", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@openpgp/web-stream-tools/-/web-stream-tools-0.0.8.tgz", + "integrity": "sha512-THgyxuegf+NeRVdDfy51fZMPgtzolyKiQpeMnZu5s9L+JGBT1+Ek3Lmp4qOGJDO9HHCXPtxgr0vB5/4Zz0XhWw==", "dev": true, "requires": { "@mattiasbuelens/web-streams-adapter": "~0.1.0", diff --git a/package.json b/package.json index 92d5467c..059e6830 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@openpgp/pako": "^1.0.12", "@openpgp/seek-bzip": "^1.0.5-git", "@openpgp/tweetnacl": "^1.0.3", - "@openpgp/web-stream-tools": "0.0.6", + "@openpgp/web-stream-tools": "0.0.8", "@rollup/plugin-commonjs": "^11.1.0", "@rollup/plugin-node-resolve": "^7.1.3", "@rollup/plugin-replace": "^2.3.2", diff --git a/src/packet/literal_data.js b/src/packet/literal_data.js index 6b6a8a98..5488ffbb 100644 --- a/src/packet/literal_data.js +++ b/src/packet/literal_data.js @@ -130,8 +130,8 @@ class LiteralDataPacket { this.date = util.readDate(await reader.readBytes(4)); - const data = reader.remainder(); - + let data = reader.remainder(); + if (stream.isArrayStream(data)) data = await stream.readToEnd(data); this.setBytes(data, format); }); }