fix: pkg upgrades and small fixes

This commit is contained in:
simon
2021-05-28 12:33:26 +02:00
parent 4af6eded3d
commit 5290ac37c0
5 changed files with 2407 additions and 4538 deletions

View File

@@ -14,7 +14,12 @@ export class UserPasswordPacketHandler implements IPacketHandler {
async handlePacket(packet: IPacket): Promise<IPacketHandlerResult> {
const username = packet.attributes['User-Name'];
const password = packet.attributes['User-Password'];
let password = packet.attributes['User-Password'];
if (typeof password !== 'string' && password.indexOf(0x00) > 0) {
// check if there is a 0x00 in it, and trim it from there
password = password.slice(0, password.indexOf(0x00));
}
if (!username || !password) {
// params missing, this handler cannot continue...