Ticket #1129: sanitize_tags-deprecation_notice-in-ops.diff

File sanitize_tags-deprecation_notice-in-ops.diff, 1.4 KB (added by Christian Beer, 13 years ago)

Changes to files in ops/ folder

  • manage_user.php

     
    9797
    9898if (isset($_POST['search_submit'])){
    9999    $search_name = post_str('search_text');
    100     $search_name = BoincDb::escape_string(strip_tags($search_name));
     100    $search_name = BoincDb::escape_string(sanitize_tags($search_name));
    101101
    102102    if (!empty($search_name)){
    103103        $result = mysql_query("SELECT * FROM user WHERE name='$search_name'");
  • clean_user_names.php

     
    1616// You should have received a copy of the GNU Lesser General Public License
    1717// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
    1818
     19// DEPRECATED: this was used to clean user names from html that was allowed at this time
     20
     21die("This file is DEPRECATED, see source for more information.");
     22
    1923$cli_only = true;
    2024require_once("../inc/db.inc");
    2125require_once("../inc/util_ops.inc");
     
    2428db_init();
    2529
    2630function clean_user($user) {
    27     if ($user->name != strip_tags($user->name)) {
    28         $x = strip_tags($user->name);
     31    if ($user->name != sanitize_tags($user->name)) {
     32        $x = sanitize_tags($user->name);
    2933        echo "ID: $user->id
    3034name: $user->name
    3135stripped name: $x