summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-27 17:30:37 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-27 17:30:37 +0000
commitac890196548bfa14e861b95dfaf910442484c631 (patch)
tree6457a470b8687b953a4670c82eea8243fd9d5ed0
parent91ccdfaf9f5b8d72ef90f9a71bf1a6f7b8d09540 (diff)
downloadhercules-ac890196548bfa14e861b95dfaf910442484c631.tar.gz
hercules-ac890196548bfa14e861b95dfaf910442484c631.tar.bz2
hercules-ac890196548bfa14e861b95dfaf910442484c631.tar.xz
hercules-ac890196548bfa14e861b95dfaf910442484c631.zip
Added code to md5 password received from charserver before comparing them with the database
(compatibility with previous implementation where 'S' passwords need to be hashed too) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13008 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/login/login.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 2db051807..a36502194 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1368,6 +1368,8 @@ int parse_login(int fd)
safestrncpy(sd->userid, (char*)RFIFOP(fd,2), NAME_LENGTH);
safestrncpy(sd->passwd, (char*)RFIFOP(fd,26), NAME_LENGTH);
+ if( login_config.use_md5_passwds )
+ MD5_String(sd->passwd, sd->passwd);
sd->passwdenc = 0;
sd->version = login_config.client_version_to_connect; // hack to skip version check
server_ip = ntohl(RFIFOL(fd,54));