Commit Graph

114 Commits

Author SHA1 Message Date
Shauren
e0ce4528c5 Core/NetworkIO: Use reactor style sending on linux to reduce locking overhead 2014-09-09 19:19:25 +02:00
Shauren
abfd29ab61 Core/WorldSession: Added research notes about CMSG_AUTH_SESSION values and reordered checks during login to always initialize encryption first to make sure the client can read failure packet 2014-08-21 18:18:13 +02:00
Shauren
c741d2682a Core/NetworkIO: Prevent queueing more async operations when socket is already closed 2014-08-11 20:43:07 +02:00
Shauren
39d3480172 Core/Authserver: Fixed writing to invalid memory address 2014-08-10 11:48:43 +02:00
Shauren
df11916ad5 Core/NetworkIO: Allow receiving packets bigger than buffer size and properly handle situations where not entire packet was read in one go
Core/Authserver: Restored authenticator functionality
2014-08-10 11:00:27 +02:00
jackpoz
78af80230d Core/Misc: Fix static analysis issues 2014-08-08 21:14:12 +02:00
Shauren
d46c3bf877 Core/Authserver: Fixed invalid memory access when AsByteArray returns less bytes than expected 2014-07-29 18:26:10 +02:00
Shauren
6f272ea5b7 Core/Network: Optimized packet sending by removing unneccessary memory copying 2014-07-27 17:46:46 +02:00
Shauren
e77c0b6ed4 Core/Network: Allow storing any packet types in Socket write queue to reduce the amount of copying going on 2014-07-27 14:59:46 +02:00
Shauren
26715795b4 Fixed gcc build 2014-07-27 01:26:03 +02:00
Shauren
c1b1ba44ba Core/Network: Refactored socket code, moved common operations to base Socket class 2014-07-26 23:26:01 +02:00
DDuarte
dcfa3bfa90 Core/Network: Fix build 2014-07-25 19:49:43 +01:00
DDuarte
4f1d247dfb Core/Network: Fix some possible exceptions on socket.close()
Ref #12634
2014-07-25 18:06:43 +01:00
Shauren
0b236d480a Core/Authserver: Fixed changing realms 2014-07-22 20:15:11 +02:00
leak
dce92611f3 Refactored singletons to enable proper deconstruction during shutdown 2014-07-20 00:40:08 +02:00
Subv
e84ba172a7 Fixed a GCC internal error when compiling AsyncAcceptor 2014-07-10 13:36:54 -05:00
Subv
110396447f Fixed the authserver not accepting clients.
Fixed using hostnames in the realmlist table.
2014-07-07 14:25:17 -05:00
Subv
77caf33deb Removed some unneeded boost dependencies.
Ensure that the correct packet sizes are read in the authserver.
Added some try catch to the authserver to deal with boost exceptions (this part is not finished)
2014-07-06 17:04:42 -05:00
leak
4f2f9e08f8 Fixed compilation and some copy paste error 2014-07-04 15:20:23 +02:00
Subv
2874014443 Cleaned up the authserver includes a bit.
Fixed authserver pch build
2014-07-02 11:50:03 -05:00
leak
c31c6f3ba3 Backported AsyncAcceptor generalization to authserver 2014-07-02 18:05:30 +02:00
leak
310f5e6846 Some ground work for ASIO based RemoteAccess handling 2014-07-02 17:38:44 +02:00
leak
a20ac4c25b Compile fix for recently added coding accessing socket information 2014-06-24 17:41:43 +02:00
Subv
0db743c4ff Merge branch 'master' of github.com:TrinityCore/TrinityCore into boost
Conflicts:
	src/server/authserver/Server/AuthSession.cpp
	src/server/game/Server/WorldSession.h
	src/server/shared/Packets/ByteBuffer.cpp
	src/server/shared/Utilities/Util.h
2014-06-23 16:35:54 -05:00
Ascathor
6949735098 Core/Misc:
* Fix some codestyle, fix some typos

* Change CMakeLists for: Custom (can be uncommented), Events, World
** Custom is theoretically unchanged. You can, however, uncomment the glob_recurse that initializes every file within. This might be easier for beginners.

* Introducing the IP Based Action Log System:
** On several different actions, e.g. Login, Character Login, etc., a new entry is added
** Can be logged on and off in worldserver config
*** Disabled by default to prevent increased log db size for unknowing users.

* Add a new row to account table called 'last_attempt_ip'
** Lists the last ip trying to connect to the account

* Add a new type of HookScripts: AccountScript
** Includes: OnAccountLogin, OnFailedAccountLogin, OnEmailChange, OnFailedChange, OnPasswordChange, OnFailedPasswordChange

* Added new Hook to PlayerScripts: OnFailedPlayerDelete

* Added new variables to PlayerScripts: OnPlayerDelete
2014-06-13 16:25:11 +02:00
leak
35aa142f6a Replaced ACE_INET_Addr with boost::asio::ip::address 2014-05-31 18:31:53 +02:00
leak
bf6e58b8d4 Ditched ACE_Singleton in favor of C++11 like Singleton 2014-05-31 15:58:59 +02:00
leak
f05d540658 Restore PCH builds and make GCC happy 2014-05-31 01:02:03 +02:00
leak
b520f7da01 Damn you VS default settings.. 2014-05-30 15:46:17 +02:00
leak
5a363ee0e1 Replace authserver ACE related code with Boost/C++11 2014-05-30 14:54:56 +02:00
QAston
9495194bf2 Fix warnings introduced on littleendian in 2134cb610d
This fix prevents possible issues on bigendian machines. Don't use c style casts ppl, it's evul.
2014-01-30 23:43:37 +01:00
QAston
139ee0c8b7 Fix incorrect debug log in authserver 2014-01-26 22:04:45 +01:00
QAston
2134cb610d Remove unneeded bigendian checks (they're already part of EndianConvert). 2014-01-26 21:32:07 +01:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
jackpoz
b0ffbb2179 Core/Auth: Fix expiring account bans
Fix a database race condition in authserver that would delay the account ban expiry by 1 login because the query that would have removed the ban was executed asynchronously.
2013-12-22 14:00:14 +01:00
jackpoz
096cb6bf00 Core/Auth: Fix Auth failing sometimes
Fix a database race condition between authserver saving session key to database asynchronously and worldserver reading it; session key is now saved synchronously.
2013-11-16 23:25:21 +01:00
Spp
94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00
leguybrush
0a308144a8 Core/Code: Unify [more] codestyle for brackets: )\n{\n} to ) { }. 2013-10-28 14:36:07 -04:00
Ascathor
2607738990 Core/Code: Unify codestyle for brackets: {} to { }.
Also added missing copyright to some files.
2013-10-27 23:46:02 +01:00
jackpoz
03657525ad Core/Auth: Mitigate DoS attacks to authserver
Mitigate DoS attacks to authserver like "Wow Auth Flooder.exe" by allowing a finite number of AUTH_LOGON_CHALLEGE packets in a row from same socket, 3 sounds like a reasonable limit.
2013-10-05 13:10:06 +02:00
Chaplain
aa8bfeec4f Auth/Misc: Code cleanup.
*Random performance optimizations
2013-09-02 19:40:31 +03:00
raczman
ba22baebbd Core/Auth: Implement time-based token for user login as described in RFC 6238.
New column in account table is a base32 of token key bytes,
coincidentally it is the same format Google's Authenticator Android app uses.
If you want that to work, set system time on server correctly and use ntpd.

Closes #10527

Signed-off-by: Nay <dnpd.dd@gmail.com>
2013-08-25 14:02:40 +01:00
QAston
2a3370929d Fix BigNumber::AsByteArray function by returning Auto_Ptr.
Remove mutex from BigNumber class - it didn't do what it was advertised to do - consider using the "locked" array outside of the function in which it was "locked".
2013-08-18 17:44:03 +02:00
Shauren
779a59e7e2 Core/Config: Refactored ConfigMgr
* Loading initial configuration files is now separate from loading any additional custom configs
2013-07-15 17:31:44 +02:00
Spp
9664c0ab5c Core/Misc: Another batch of fixes for issues found by static analysis 2013-05-30 13:18:29 +02:00
Spp
d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
Bezo
7542049eba [Ip2nationLock] Implement the ip2nation lock country. 2013-04-22 15:53:48 +02:00
Nay
db0b81e8e7 Core/RealmSocket: Remove a not required #ifndef MSG_NOSIGNAL / #define MSG_NOSIGNAL 0
Somewhere in ACE overloads of send(), flags are default'ed  to 0 if not provided
2013-02-11 03:33:02 +00:00
Nay
42e660e2a2 Core/Sockets: Always try to send MSG_NOSIGNAL in peer().send()
Fixes RASocket::authenticate crash

"MSG_NOSIGNAL:
If you send() to a remote host which is no longer recv()ing, you'll typically get the signal SIGPIPE. Adding this flag prevents that signal from being raised."

Closes #5040
Thanks to @derex for the hint
2013-02-11 02:59:37 +00:00
Shauren
b6e56e42ea Core/Auth: Reverted part of fb43a92cc2 - session key is still needed after logging in to be able to switch realms 2013-02-08 01:03:56 +01:00