diff options
Diffstat (limited to 'src/login_sql')
-rw-r--r-- | src/login_sql/login.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/login_sql/login.c b/src/login_sql/login.c index edc78d48f..1fad6f4dc 100644 --- a/src/login_sql/login.c +++ b/src/login_sql/login.c @@ -598,7 +598,12 @@ int mmo_auth( struct mmo_account* account , int fd){ strftime(tmpstr, 24, "%Y-%m-%d %H:%M:%S",localtime(&raw_time));
jstrescapecpy(t_uid,account->userid);
- jstrescapecpy(t_pass, account->passwd);
+
+ if (account.passwdenc==PASSWORDENC) {
+ memset(t_pass, 0, sizeof(t_pass));
+ memcpy(t_pass, account->passwd, strlen(account->passwd));
+ } else
+ jstrescapecpy(t_pass, account->passwd);
// make query
|