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