Browse Source

Strip unwanted parts of the spamcop auth code in case someone enters
them accidentally.

Thijs Kinkhorst 22 years ago
parent
commit
c214b0167a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      plugins/spamcop/options.php

+ 3 - 0
plugins/spamcop/options.php

@@ -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;