fix(eap): concat buffers if they are an array

This commit is contained in:
simon 2020-06-25 12:06:25 +02:00
parent e71f0b3d80
commit 3d03658a43

View File

@ -32,7 +32,11 @@ export class EAPPacketHandler implements IPacketHandler {
} }
// EAP MESSAGE // EAP MESSAGE
const msg = packet.attributes['EAP-Message'] as Buffer; let msg = packet.attributes['EAP-Message'] as Buffer;
if (Array.isArray(msg)) {
msg = Buffer.concat(msg);
}
try { try {
const { code, type, identifier, data } = decodeEAPHeader(msg); const { code, type, identifier, data } = decodeEAPHeader(msg);