From f44474ebf5d3a34f47a75ccd2a2924f1d6fbb804 Mon Sep 17 00:00:00 2001 From: sje Date: Tue, 3 Jul 2007 01:03:35 +0000 Subject: only use first 10 chars of password git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@246 4f64403b-2f21-0410-a795-97e2b3489a10 --- MySpace/server_con.cpp | 9 ++++++--- MySpace/version.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'MySpace') diff --git a/MySpace/server_con.cpp b/MySpace/server_con.cpp index 94c0cc5..baf506f 100644 --- a/MySpace/server_con.cpp +++ b/MySpace/server_con.cpp @@ -183,16 +183,19 @@ void try_login(NetMessage &msg, HANDLE connection) { char *ch_resp; mir_sha1_byte_t pw_hash[20]; int ch_resp_size; - wchar_t wpw[256]; mir_sha1_byte_t key[20]; char email[256]; + // only use first 10 chars of pw + wchar_t wpw[11]; + wpw[10] = 0; + #ifdef _UNICODE - _tcscpy(wpw, options.pw); + _tcsncpy(wpw, options.pw, 10); WideCharToMultiByte(CP_UTF8, 0, options.email, -1, email, 256, 0, 0); #else strcpy(email, options.email); - MultiByteToWideChar(code_page, 0, options.pw, -1, wpw, 256); + MultiByteToWideChar(code_page, 0, options.pw, -1, wpw, 10); #endif sha1.sha1_hash((mir_sha1_byte_t*)wpw, wcslen(wpw) * sizeof(wchar_t), pw_hash); diff --git a/MySpace/version.h b/MySpace/version.h index 59e6710..5fe886d 100644 --- a/MySpace/version.h +++ b/MySpace/version.h @@ -5,7 +5,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 0 #define __RELEASE_NUM 1 -#define __BUILD_NUM 15 +#define __BUILD_NUM 16 #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM #define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM -- cgit v1.2.3