summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-07 16:16:06 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-07 16:16:06 +0000
commit24bd31d17ccf593b9eb5fcdf803ab956fbd17cbc (patch)
tree139c6b583319db242f39f9c1d1a7978c5d7c3d39
parenta608dec02072f9b297bad8ae95e730751e4d84a9 (diff)
downloadhercules-24bd31d17ccf593b9eb5fcdf803ab956fbd17cbc.tar.gz
hercules-24bd31d17ccf593b9eb5fcdf803ab956fbd17cbc.tar.bz2
hercules-24bd31d17ccf593b9eb5fcdf803ab956fbd17cbc.tar.xz
hercules-24bd31d17ccf593b9eb5fcdf803ab956fbd17cbc.zip
Fixing the 'name requests work at any distance' exploit (bugreport:3206).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13858 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/clif.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index ba774497c..030613377 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8327,6 +8327,9 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd)
if( bl == NULL )
return; // Lagged clients could request names of already gone mobs/players. [Skotlex]
+ if( sd->bl.m != bl->m || !check_distance_bl(&sd->bl, bl, AREA_SIZE) )
+ return; // Block namerequests past view range
+
// 'see people in GM hide' cheat detection
/* disabled due to false positives (network lag + request name of char that's about to hide = race condition)
sc = status_get_sc(bl);