diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-28 14:34:58 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-28 14:34:58 +0000 |
commit | ef439f32648f3e9eca0c4f3b69413b53891cf3e7 (patch) | |
tree | 4724572d4f7dd8c9043e7edf4c658ed614fb4e6c /src/login_sql/login.h | |
parent | c6751c77338a496ed61c5465fcdc55ed877ce96a (diff) | |
download | hercules-ef439f32648f3e9eca0c4f3b69413b53891cf3e7.tar.gz hercules-ef439f32648f3e9eca0c4f3b69413b53891cf3e7.tar.bz2 hercules-ef439f32648f3e9eca0c4f3b69413b53891cf3e7.tar.xz hercules-ef439f32648f3e9eca0c4f3b69413b53891cf3e7.zip |
* Tried and fixed md5 password encryption
- login_sql was doing stupid things like re-using one pre-generated key for all connections, and escaping binary md5 data (destroying it)
- added missing code to login_txt when creating new accounts, showing that storing passwords as md5 hashes never really worked for txt
- removed PASSWORDENC's conditional compilation effect, now just a flag
- greatly simplified md5 password checking code, credits to eapp
* login server will now bind only after finishing the init phase
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10384 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login_sql/login.h')
-rw-r--r-- | src/login_sql/login.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/login_sql/login.h b/src/login_sql/login.h index 7afe4b358..abd28daef 100644 --- a/src/login_sql/login.h +++ b/src/login_sql/login.h @@ -10,17 +10,15 @@ #define SQL_CONF_NAME "conf/inter_athena.conf" #define LAN_CONF_NAME "conf/subnet_athena.conf" +// supported encryption types: 1- passwordencrypt, 2- passwordencrypt2, 3- both +#define PASSWORDENC 3 + #ifndef SQL_DEBUG #define mysql_query(_x, _y) mysql_query(_x, _y) #else - #define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y) + #define mysql_query(_x, _y) debug_mysql_query(__FILE__, __LINE__, _x, _y) #endif -#define PASSWORDENC 3 // A definition is given when making an encryption password correspond. - // It is 1 at the time of passwordencrypt. - // It is made into 2 at the time of passwordencrypt2. - // When it is made 3, it corresponds to both. - struct mmo_account { int version; char userid[NAME_LENGTH]; |