|
|
@ -16,7 +16,7 @@ export class UserPasswordPacketHandler implements IPacketHandler {
|
|
|
|
const username = packet.attributes['User-Name'];
|
|
|
|
const username = packet.attributes['User-Name'];
|
|
|
|
let password = packet.attributes['User-Password'];
|
|
|
|
let password = packet.attributes['User-Password'];
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof password !== 'string' && password.indexOf(0x00) > 0) {
|
|
|
|
if (Buffer.isBuffer(password) && password.indexOf(0x00) > 0) {
|
|
|
|
// check if there is a 0x00 in it, and trim it from there
|
|
|
|
// check if there is a 0x00 in it, and trim it from there
|
|
|
|
password = password.slice(0, password.indexOf(0x00));
|
|
|
|
password = password.slice(0, password.indexOf(0x00));
|
|
|
|
}
|
|
|
|
}
|
|
|
|