Strip unwanted parts of the spamcop auth code in case someone enters
[squirrelmail.git] / plugins / spamcop / options.php
index 18f1a0a..5850261 100755 (executable)
@@ -43,6 +43,9 @@ switch ($action) {
         break;
     case 'save_id':
         if (isset($ID)) {
+            $ID = trim($ID);
+            $ID = preg_replace('/@.*/','',$ID);
+            $ID = preg_replace('/.*\./','',$ID);
             setPref($data_dir, $username, 'spamcop_id', $ID);
         }
         break;