From d60a990f282693412fcdfd62ee4152c107cbf5a9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 4 May 2018 01:04:57 +0300 Subject: Fix pincode check. Was broken in commit 2a05dbfc2f62c6bbac7983dcec120502914567f1. --- src/char/pincode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/char/pincode.c b/src/char/pincode.c index 01c1f482c..3b22a0a8c 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -82,6 +82,7 @@ void pincode_check(int fd, struct char_session_data* sd) return; safestrncpy(pin, RFIFOP(fd, 6), sizeof(pin)); + pincode->decrypt(sd->pincode_seed, pin); if (pincode->check_blacklist && pincode->isBlacklisted(pin)) { pincode->loginstate(fd, sd, PINCODE_LOGIN_RESTRICT_PW); -- cgit v1.2.3-70-g09d2 From fa5cc0300a337d4bb242fc10f6747fac1f1752c4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 4 May 2018 01:12:08 +0300 Subject: Fix sending correct packets in pincode_makestate and pincode_editstate. --- src/char/pincode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/char/pincode.c b/src/char/pincode.c index 3b22a0a8c..73d9809fa 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -206,7 +206,7 @@ void pincode_makestate(int fd, struct char_session_data *sd, enum pincode_make_r WFIFOHEAD(fd, 8); WFIFOW(fd, 0) = 0x8bb; WFIFOW(fd, 2) = state; - WFIFOW(fd, 4) = 0; + WFIFOL(fd, 4) = sd->pincode_seed; WFIFOSET(fd, 8); } @@ -224,7 +224,7 @@ void pincode_editstate(int fd, struct char_session_data *sd, enum pincode_edit_r WFIFOHEAD(fd, 8); WFIFOW(fd, 0) = 0x8bf; WFIFOW(fd, 2) = state; - WFIFOW(fd, 4) = sd->pincode_seed = rnd() % 0xFFFF; + WFIFOL(fd, 4) = sd->pincode_seed = rnd() % 0xFFFF; WFIFOSET(fd, 8); } -- cgit v1.2.3-70-g09d2