Added security patch
[squirrelmail.git] / src / options_order.php
index ffa70ac17f5672f95dcdf7cbe5be7586cb47c09a..670a54897cd27a8c7e2bfceb7b8871462585fb13 100644 (file)
          include ('../src/load_prefs.php');
       }
    } else if ($method == 'add' && $add) {
+      // User should not be able to insert PHP-code here
+      $add = str_replace ('<?', '..', $add);
+      $add = ereg_replace ('<.*script.*language.*php.*>', '..', $add);
+      $add = str_replace ('<%', '..', $add);
       $index_order[count($index_order)+1] = $add;
    }