summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2025-06-12 21:22:49 -0300
committerJesusaves <cpntb1@ymail.com>2025-06-12 21:22:49 -0300
commitdf2928a2d497d87c4725ae6eac819b0b82e907de (patch)
treefdff0aa1e8ad0fab6533be184eab6c2e59ad485f
parent9ec0d89516e09c01b26123b2fc96cbb99a343dd6 (diff)
downloadserverdata-df2928a2d497d87c4725ae6eac819b0b82e907de.tar.gz
serverdata-df2928a2d497d87c4725ae6eac819b0b82e907de.tar.bz2
serverdata-df2928a2d497d87c4725ae6eac819b0b82e907de.tar.xz
serverdata-df2928a2d497d87c4725ae6eac819b0b82e907de.zip
[VULN] Fix a vulnerability due to bad code
-rw-r--r--npc/001-8/hub.txt9
-rw-r--r--npc/001-8/mapflags.txt2
-rw-r--r--npc/018-5-boss/mapflag.txt4
3 files changed, 12 insertions, 3 deletions
diff --git a/npc/001-8/hub.txt b/npc/001-8/hub.txt
index d1722b723..d82fc54a2 100644
--- a/npc/001-8/hub.txt
+++ b/npc/001-8/hub.txt
@@ -368,6 +368,15 @@ OnPCLogoutEvent:
@qhub_victor=0;
@qhub_died=0;
}
+ // If you have a pet, eliminate ALL pets, permanently, from the database
+ // This is over-reaching and will delete from all chars
+ if (getpetinfo(0)) {
+ query_sql("DELETE FROM `pet` WHERE account_id = '"+getcharid(3)+"'");
+ Exception(sprintf("%d found in violation of the rules, and all pets were killed.", getcharid(3)), RB_IRCBROADCAST);
+ }
+ // FIXME: It's actually possible to destroy all correspondence, or to
+ // use sc_* commands to make set all mails to sent and reset
+ // But nostorage is supposed to deal with it
// If you are the victor (and didn't cheat), you can now hold your reward ;-)
if (@qhub_victor) {
diff --git a/npc/001-8/mapflags.txt b/npc/001-8/mapflags.txt
index 5fcbceb95..17e546331 100644
--- a/npc/001-8/mapflags.txt
+++ b/npc/001-8/mapflags.txt
@@ -2,4 +2,4 @@
001-8 mapflag pvp
001-8 mapflag pvp_noparty
001-8 mapflag pvp_noguild
-001-8 mapflag nostorage
+001-8 mapflag nostorage 3
diff --git a/npc/018-5-boss/mapflag.txt b/npc/018-5-boss/mapflag.txt
index 2e3293e36..d329581b3 100644
--- a/npc/018-5-boss/mapflag.txt
+++ b/npc/018-5-boss/mapflag.txt
@@ -1,5 +1,5 @@
018-5-boss mapflag zone No Tricks
018-5-0 mapflag nopet
018-5-1 mapflag nopet
-018-5-0 mapflag nostorage
-018-5-1 mapflag nostorage
+018-5-0 mapflag nostorage 3
+018-5-1 mapflag nostorage 3