Browse Source

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://svn.code.sf.net/p/rathena/svn/trunk@13008 54d463be-8e91-2dee-dedb-b68131a5f0ec

ultramage 17 years ago
parent
commit
372aa678c2
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/login/login.c

+ 2 - 0
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));