Commit Graph

185 Commits

Author SHA1 Message Date
Shauren
d72c4085de Core/Misc: Fixed build without pch 2014-09-14 17:29:13 +02:00
Shauren
a0e50ea35f Core/Entities: Use ObjectGuid class in game project 2014-09-14 16:14:12 +02:00
Shauren
e0ce4528c5 Core/NetworkIO: Use reactor style sending on linux to reduce locking overhead 2014-09-09 19:19:25 +02:00
leak
1a27ce1267 Core/NetworkIO: Restore networking related scripting hooks
Closes #12607
2014-08-11 17:40:43 +02:00
jackpoz
272b9d3d16 Core/WorldSession: Fix socket not being closed on clean logout
Close the WorldSession socket if Player didn't even login or logged out successfully and then closed the client.
2014-08-09 19:37:57 +02:00
jackpoz
15b1d41740 Core/NetworkIO: Adjust more packet throttling values
Adjust more packet throttling values by increasing some limits, this might fix some random kicks.
2014-08-04 18:43:15 +02:00
Shauren
6f272ea5b7 Core/Network: Optimized packet sending by removing unneccessary memory copying 2014-07-27 17:46:46 +02:00
Shauren
c1b1ba44ba Core/Network: Refactored socket code, moved common operations to base Socket class 2014-07-26 23:26:01 +02:00
leak
a738cd96dc Renamed WorldTcpSession back to WorldSocket 2014-07-07 22:03:41 +02:00
Subv
32f5286d05 Fixed compile 2014-07-06 13:46:17 -05:00
Subv
80a8ed23b7 Fixed player saving 2014-07-06 13:02:46 -05:00
Subv
b5d5768d44 Fixed the crashes 2014-07-05 21:38:29 -05:00
Subv
42b2041aeb Fixed PCH build, some leaks and tidied the code up a bit 2014-07-05 19:41:18 -05:00
leak
7befb26625 Some groundwork for replacing the ACE based WorldSocket handling 2014-07-06 01:26:29 +02:00
Subv
87b72f41ca Fixed login and some errors 2014-07-02 21:56:40 -05:00
leak
029bad6698 Replaced all remaining ACE based Singletons
Replaced ACE base AutoPtr class with shared_ptr
Note: worldserver currently broken due to MapUpdater threading failure (ACE ofc, what else could it be)
2014-07-01 00:54:09 +02:00
Subv
f03d49705d Core/Databases: Removed ACE dependencies on some of the database handling code. 2014-06-24 13:17:41 -05:00
Shauren
06962b16f1 Core/PacketIO: Fixed logic in DosProtection::EvaluateOpcode 2014-06-11 19:28:25 +02:00
Shauren
2ba05406ce Fixed typo, spotted by @Gooyeth 2014-06-11 18:21:00 +02:00
jackpoz
d52eb14bb6 Core/NetworkIO: Adjust more packet throttling values
Ignore some opcodes that don't cause any trouble.
Remove old Allow/Disable Anti-DoS system since it's no longer required.
2014-06-09 21:37:44 +02:00
Vincent-Michael
1d39db16b9 Core/Misc: Kill Whitespace ... 2014-06-07 23:58:08 +02:00
jackpoz
5fee5b0125 Core/Banks: Fix some bank exploits
Re-implement the cheat checks removed in a12501fb5e and check if Player can interact with the Banker when handling bank-related opcodes.
2014-06-07 22:47:50 +02:00
Michael
8207aff0d6 Core/NetworkIO: Added latency info for opcodes overflow log 2014-06-06 19:41:57 +02:00
Trisjdc
d12737d9bb Core/WorldSession: After sudden disconnects, session should persist for a minute
- With this change, if a player alt-f4, he'll only fade from world after a minute
2014-06-03 01:12:34 +01:00
jackpoz
65917f52ea CoreCore/NetworkIO: Fix disconnect when canceling character creation
Remove the filter on CMSG_CHAR_ENUM added in 59b4c34924 since the same opcode is already throttled in the new improved system. DoS attacks using this opcode are still mitigated with same effect of before.
Fixes #10915
2014-05-29 21:11:41 +02:00
jackpoz
1b47f3270e Core/NetworkIO: Adjust more packet throttling values
Adjust more packet throttling values and add Player name to log to help investigate false positives.
2014-05-29 19:43:09 +02:00
jackpoz
f312b86941 Core/NetworkIO: Adjust more packet throttling values 2014-05-27 21:19:19 +02:00
jackpoz
b5b64a2cdd Core/NetworkIO: Adjust more packet throttling values 2014-05-26 20:13:04 +02:00
jackpoz
c06dc7d37a Core/NetworkIO: Adjust more packet throttling values
Adjust some more packet throttling values.
Revert b35f831f2b since it's no longer needed.
Modify the AntiDoS log to specify in a more readable way which opcode triggered the system and how many packets have been received.
2014-05-25 20:14:59 +02:00
jackpoz
2f0f8f8018 Core/NetworkIO: Adjust packet throttling values
Adjust packet throttling values to avoid false positive. In case you are experiencing random kicks change the PacketSpoof.Policy setting in worldserver configs and report which packets are triggering the anti-dos system.
2014-05-25 15:26:49 +02:00
jackpoz
a4ba54fbdb Core/NetworkIO: Improve packet spam solution
Implement an improved packet Anti-DoS by counting how many times the same opcode has been sent in the last second and applying the policy specified in the configs if the amount of packets exceeds a reasonable amount.
Credits to the original author who decided to share this with TrinityCore team.
2014-05-24 22:34:06 +02:00
Shauren
fe99d6ef76 Core/Movement: Fixed an exploit allowing players to crash the server by using modified movement packets 2014-04-24 10:22:57 +02:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
jackpoz
1c0903e286 Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values. Most of them are false positives, always initialized before being accessed, while some of them are real issues spotted by valgrind too.
2013-12-14 18:41:26 +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
jackpoz
4aee86627e Core/WorldSession: Mitigate DoS attacks
Mitigate DoS attacks like one explained in #10555 by processing a limited number of packets at each WorldSession::Update() call, allowing other WorldSessions to be processed.
100 packets in a single update sound like a reasonable amount.
2013-10-17 22:03:51 +02:00
Shauren
ce55647c41 Core/Transports
* Rewritten path generation, now uses splines - timers are a lot more accurate now
* Implemented stopping transports
* Implemented spawning transports in instances
* Implemented spawning gameobjects as transport passengers
* Transport passengers are now stored in creature/gameobject table using gameobject_template.data6 from transport's template as map id
2013-10-16 18:37:29 +02:00
Spp
895a23df11 Core/RBAC: Add default groups to accounts based on their security level.
- Removed config option RBAC.DefaultGroups

Use the table rbac_security_level_groups to configure the groups to be added to the account at load time.

Note: Those groups are only used at run time, never saved to DB
2013-09-27 13:35:45 +02:00
Spp
cfaea769bc Core/RBAC: Move RBAC code to namespace rbac 2013-09-27 13:35:45 +02:00
jackpoz
2cca3982d4 Core/Movement: Port Ascent r1637 http://sourceforge.net/p/ascentemubackup/code/1637/ to TrinityCore
Port some movement packet fixes, taking into account client/server connection lag.
Credits to original author, check http://sourceforge.net/p/ascentemubackup/code/1637/ for more details.
MOVEMENT_PACKET_TIME_DELAY default value is currently set to 0, feel free to set it to different values and report feedback.
2013-09-26 20:09:50 +02:00
Shauren
6b60877e3e Core/NetworkIO: Fixed memory leak 2013-09-01 17:48:47 +02:00
Vincent-Michael
87e105c818 Core: Fix warning 2013-08-30 20:56:41 +02:00
Nay
aa5bc37e9c Core: Yet more warning fixes 2013-08-30 16:03:37 +01:00
Nay
1903d4ca7d Core/Server: Fix a spammy warning in WorldSession and move code to .cpp 2013-08-30 15:44:17 +01:00
Machiavelli
9346695129 Core: Few fixes for previous commit. 2013-08-29 21:55:29 +01:00
Machiavelli
59b4c34924 Core/NetworkIO: Generic packet spam solution
Currently regulates the usage of CMSG_CHAR_ENUM only, but can be easily
extended to detect inappropriate network behaviour by using
AntiDOS.AllowOpcode in WorldSession's handlers.
2013-08-29 16:46:28 +01:00
Shauren
55fa58af19 Core/Movement: Prevent dynamic changes of movement flags for charmed creatures
Closes #10075
Closes #10079
2013-06-22 13:42:13 +02:00
Shauren
89ec907539 Core/Objects: Refactored MovementInfo structure 2013-06-18 18:15:33 +02:00
Malcrom
ec474a62e5 Core: More Function Renaming. 2013-06-11 21:25:12 -02:30
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