Commit Graph

170 Commits

Author SHA1 Message Date
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
Shauren
d24ef896df Core/PacketIO: Implemented possibility to ban client addons serverside 2013-04-05 15:06:35 +02:00
Nefarion
46ba2d945a Allow reply to whispers if you are under CONFIG_CHAT_WHISPER_LEVEL_REQ, and implement feature for GMs to remove single players from their WhisperWhiteList. 2013-03-15 10:27:18 +01:00
Nefarion
49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
Spp
480c6cf4dd Core/RBAC: Add .reload rbac command and prevent possible crash if rbac_permissions has wrong data 2013-02-27 03:30:53 +01:00
Spp
00c58f25d7 Core/RBAC: Force loadPermissions before checking session permissions if the storage is null (someone created a session but forgot to call to LoadPermissions) 2013-02-26 22:35:55 +01:00
Spp
15343d9bb0 Core/RBAC: Remove unnecessary header includes from other header files 2013-02-25 15:48:17 +01:00
Shauren
59c3c6b8a6 Core/Players: Allow players to log out in combat when they are in resting area (logout in rest area is instant by default, but not when in combat) 2013-02-20 20:52:58 +01:00
Spp
b980aff83e Core: Implement Role based Access Control
- This system will give more control of actions an account can perform.

System defines:
- Permissions to perform some action
- Roles: a set of permissions that have some relation
- Groups: a set of roles that have some relation

Operations:
- Grant: Assign and allow
- Deny: Assign and do not allow
- Revoke: Remove

Precedence to know if something can be done: Grant, Deny. That means, if you are granted some action by a role but you have denied the permission, the action can not be done.

Some Rules:
- Groups can only have roles
- Roles can only have permissions
- An account can be assigned granted and denied roles. Permissions inherited from roles are granted if roles is granted and denied if roles is denied
- An account can be assigned granted and denied permissions
- An account can have multiple groups, roles and permissions
- An account can not have same role granted and denied at same time
- An acconnt can not have same permission granted and denied at same time
- Id 0 can not be used to define a group, role or permission

Added some permissions as a sample of use (Instant Logout, Skip Queue, Join BGs, Join DF) and some permissions as a workaround to commands till command system is modified to use RBAC
2013-02-04 09:04:33 +01:00
Spp
fa5dd4bd4e Core/Misc: Remove some calls to const_cast 2013-01-30 08:39:06 +01:00
Spp
927062f61f Core/Misc: Some changes to reduce differences with 4.3.4 branch + some cosmetic changes 2013-01-16 11:17:14 +01:00
Spp
802657250c Core/Misc: Apply codestyle to multiple files 2013-01-14 09:50:59 +01:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Spp
0c4e8c8dc2 Core/Network: Enable trace loggers for packet send and receive (just account + opcodeName, opcodeId) 2012-11-23 12:36:18 +01:00
Spp
9fbc4c0ae2 Core/Misc: reduced amount of string memory allocations (Step II) 2012-10-24 15:34:48 +02:00