biow0lf / evedev-kb

Automatically exported from code.google.com/p/evedev-kb
1 stars 0 forks source link

Req Enhancement: Slightly better filtering in class.kill.php #154

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
the scout/logi mod floating around works by essentially poisoning the 
kb3_inv_detail table with extra entries that get filtered out by side effect 
most places in the KB.

One of the more important places they don't get filtered out is in 
Kill->getRawMail().

If we more aggressively filtered out involved party entries that were obviously 
corrupt, then we get better killmail exports regardless, and we get the nice 
side effect that the scoutmod stops boards from exporting bad mails.

Here is the diff that I used on our board:

Index: class.kill.php
===================================================================
--- class.kill.php      (revision 1260)
+++ class.kill.php      (working copy)
@@ -410,6 +410,11 @@

                        $weapon = $inv->getWeapon();
                        $ship = $inv->getShip();
+                        $wn = $weapon->getName();
+
+                        if ( $wn == "" || ! isset($wn) )
+                          continue;
+
                        if ($pilot->getName() == $weapon->getName())
                        {
                                $name = $pilot->getName()." / ".$corp->getName();

Original issue reported on code.google.com by jjl...@gmail.com on 13 Apr 2011 at 2:02

GoogleCodeExporter commented 9 years ago
I don't think that in general EDK should add checks on output in case mods have 
damaged the DB. Errors happen, though, especially on shared hosting, so I added 
some name checks in r1390 which are similar to what you propose.

Original comment by kovellia on 11 Jul 2011 at 4:10