Commit graph

42 commits

Author SHA1 Message Date
tomrus88
fec1a1954c Merge commit 'origin/master' into 320
Conflicts:
	src/game/MovementHandler.cpp
2009-08-20 16:24:37 +04:00
VladimirMangos
35121cdd34 [8389] Implement check really read received packet size and warning it not all data read.
* This let more easy catch packet structure chnages at client switch.
* Fixed structure CMSG_GUILD_BANK_SWAP_ITEMS
* Fixed structure CMSG_SPLIT_ITEM, CMSG_SELL_ITEM
* Added read data amount fixes for some other packets.

Thanks to TOM_RUS in help check correct packets structure.

Note: not all packets possible fixed. Please report for not fixed cases at errors:
"opcode %s (0x%.4X) have unprocessed tail data (read stop at %u from %u)"
2009-08-19 00:45:24 +04:00
tomrus88
f553cf2887 Merge commit 'origin/master' into 320
Conflicts:
	src/game/CharacterHandler.cpp
	src/game/DuelHandler.cpp
	src/game/ItemHandler.cpp
	src/game/Mail.cpp
	src/game/MiscHandler.cpp
	src/game/MovementHandler.cpp
	src/game/TaxiHandler.cpp
	src/game/WorldSession.h
	src/game/WorldSocket.cpp
2009-08-17 10:31:02 +04:00
arrai
a24f39a36f [8378] Use exceptions instead of explicit size checking for each packet
CHECK_PACKET_SIZE was pretty error prone; once it was forgotten mangosd
could crash due to the asserts in ByteBuffer.h. That was exploitable by
malicious players.
Furthermore, there were duplicate checks: Additionally to
CHECK_PACKET_SIZE, the ByteBuffer assertions keept an eye
on not exceeding the packet boundaries - just to crash the server for
sure in such a case.
To prevent memory leaks or other undesirable states, please read in
every handler all variables _before_ doing any concrete handling.
2009-08-16 23:50:22 +02:00
tomrus88
0045d09a66 Some comments. 2009-08-15 17:41:50 +04:00
tomrus88
2c30020c7e Login with 3.2.2.10257 should work now. 2009-08-15 14:24:04 +04:00
VladimirMangos
67b52a2294 [8278] Update packet size checks in WorldSocket::HandleAuthSession to 3.x state. 2009-07-30 12:46:20 +04:00
tomrus88
7c52111fb1 Fixed /played chat command.
(cherry picked from commit 3e49bbe692ea5f44ea2daffdfe970a7201d501f5)

Conflicts:

	src/game/MiscHandler.cpp
	src/game/SharedDefines.h
	src/game/UpdateFields.h
	src/realmd/AuthCodes.h
2009-07-29 15:14:23 +04:00
tomrus88
afd82229d7 Merge commit 'origin/master' into 310
Conflicts:
	src/game/SpellAuras.cpp
	src/game/SpellEffects.cpp
2009-05-24 10:11:26 +04:00
Derex
6a5cd72e4d [7878] Use bigger buf for better performence.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-05-23 01:54:23 +04:00
tomrus88
d4323e0071 Merge commit 'origin/master' into 310
Conflicts:
	src/game/CharacterHandler.cpp
	src/game/Player.cpp
2009-04-29 11:51:15 +04:00
VladimirMangos
512c015dc2 [7731] Some code cleanups, warrning fixes. 2009-04-29 04:03:59 +04:00
tomrus88
2a0fbbb0dd Fixed some bg and quest things 2009-03-18 12:51:31 +03:00
tomrus88
cc6d0e0568 Small update 2009-03-15 10:10:21 +03:00
tomrus88
31b3ee95ad Merge branch 'master' into 310
Conflicts:
	src/game/Level2.cpp
	src/game/PetHandler.cpp
	src/game/Player.cpp
	src/game/Player.h
	src/game/SkillHandler.cpp
2009-03-11 12:22:58 +03:00
balrok
0babfec043 [7424] Codestyle: removed not needed \n in log output.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2009-03-09 14:20:10 +03:00
tomrus88
2626d8c243 Just a commit 2009-03-08 14:35:15 +03:00
tomrus88
8f9849969b Updated to 9658 client build, SMSG_ADDON_INFO temporary disabled 2009-03-08 01:51:23 +03:00
tomrus88
e6a66cdc54 Updated to new client build 2009-03-04 14:58:11 +03:00
tomrus88
2197da6407 Fixed player name response (chat now working) 2009-03-03 12:38:16 +03:00
VladimirMangos
9b3daf3933 [7330] Code warnings and style cleanups. Some bugs fixes.
1) comparison singed and unsigned values
2) redundent includes
3) wrong constructor :-part field initilization
4) unused not-/*name*/-guarded args in template/virtual functions that not required like args.
5) explicitly list not implemented achievement types.

Also bugs fixed:
1) Drop wrong phase mask 0 check in WorldObject::InSamePhase.
2) ArenaTeamMember::ModifyPersonalRating incorrect work with move points in negative with infinity values in result.
3) ArenaTeam::SaveToDB code send uint64 value to string with arg format %u.
2009-02-24 01:54:53 +03:00
VladimirMangos
ad03d3c73b [7189] Prevent use wrong security levels (>= SEC_CONSOLE) 2009-01-26 22:05:18 +03:00
derex
a865eb6010 [7022] Added support for packets > 64 kb 2009-01-04 19:20:06 +01:00
arrai
dfa29a883f Replaced dynamic by static allocation in server packets header. Added command to test large packets. 2009-01-04 18:42:06 +01:00
arrai
c6f48843ad [7017] Updated copyright notice for new year 2009-01-03 18:09:51 +01:00
tomrus88
5d4d7292b9 Merge branch 'master' into 303
Conflicts:
	src/game/Player.h
2008-12-12 18:14:49 +03:00
VladimirMangos
d386a67d27 [6898] Prevent processing incoming packates for closed connection. 2008-12-12 02:00:47 +03:00
VladimirMangos
3da9f3f4cc [6889] Backport some not client version specific changes and fixes from 303 branch. 2008-12-09 14:08:29 +03:00
arrai
0dbc77a628 Added support for large server to client packets. SMSG_RESPOND_INSPECT_ACHIEVEMENTS and SMSG_ALL_ACHIEVEMENT_DATA have a good chance of reaching the old 32767 byte limit. 2008-12-02 17:35:41 +01:00
tomrus88
6fae544fbe Merge branch 'master' into 303
Conflicts:
	src/game/WorldSocket.cpp
	src/shared/Database/DBCStructure.h
	src/shared/Database/DBCfmt.cpp
2008-11-10 01:10:52 +03:00
derex
d53b77cadf Fixed english spelling in src/game/WorldSocket.h/cpp. 2008-11-09 17:06:36 +02:00
tomrus88
78ec66babc Merge branch 'master' into 303
Conflicts:
	contrib/extractor/System.cpp
	contrib/extractor/ad.exe
	src/game/WorldSocket.cpp
2008-11-06 15:50:47 +03:00
hunuza
90828fa699 Cache highest arena team/guild ids. Some code clean up. 2008-11-05 16:58:57 +01:00
tomrus88
6496f7499e Account data saving must work now 2008-10-28 01:44:27 +03:00
tomrus88
002a2fc5fc Fixed SMSG_TRANSFER_ABORT opcode 2008-10-27 09:08:25 +03:00
tomrus88
d738b39a4c Updated world stuff 2008-10-26 10:24:04 +03:00
VladimirMangos
51b2290be6 Some endianess related fixes and cleanups
* Fixed: build fail at bigendian platform in result typo in code
* Hide endianess related convertions into EndianConvert/EndianConvertReverse calls
* Linkning errors protection from attemps convertion pointers.
2008-10-24 04:06:27 +04:00
vladimir-mangos
398b5535b7 * Remove unused now TcpNoDelay config option. Patch provided by TonyMontana5000.
* Fixed: move includes to prevent fail rebuild WorldSocket.cpp.
 * Apply code style to WorldSocket.* and WorldSocketMgr.cpp
2008-10-17 06:30:08 +04:00
TheLuda
adc46ef907 Applied new coding standard, see http://github.com/mangos/mangos/wikis/codingstandards for more. 2008-10-15 18:26:08 +02:00
TheLuda
800ee76535 Imported MaNGOS revision 6767 from http://mangos.svn.sourceforge.net/svnroot/mangos/trunk/ 2008-10-14 00:29:20 +02:00
tomrus88
28dc20c6e2 Small code cleanup and partial merge with dev branch 2009-03-21 19:07:38 +03:00
tomrus88
e774fd3730 Small fix for my previous commit 2009-03-21 16:54:41 +03:00