Merge pull request #779 from twiss/throw-parse-errors
Throw on parse errors in integrity protected encrypted packets
This commit is contained in:
commit
1e3f223e8b
|
@ -53,10 +53,9 @@ List.prototype.read = async function (bytes) {
|
|||
await packet.read(parsed.packet);
|
||||
await writer.write(packet);
|
||||
} catch (e) {
|
||||
if (!config.tolerant ||
|
||||
parsed.tag === enums.packet.symmetricallyEncrypted ||
|
||||
parsed.tag === enums.packet.literal ||
|
||||
parsed.tag === enums.packet.compressed) {
|
||||
if (!config.tolerant || packetParser.supportsStreaming(parsed.tag)) {
|
||||
// The packets that support streaming also happen to be the same
|
||||
// ones we want to throw on parse errors for.
|
||||
await writer.abort(e);
|
||||
}
|
||||
util.print_debug_error(e);
|
||||
|
|
Loading…
Reference in New Issue
Block a user