Make WordPress Core

Ticket #14516: stripslashes-db-values-on-install.patch

File stripslashes-db-values-on-install.patch, 661 bytes (added by johanee, 15 years ago)

Stripslash input during db install

  • wp-admin/setup-config.php

     
    152152        break;
    153153
    154154        case 2:
    155         $dbname  = trim($_POST['dbname']);
    156         $uname   = trim($_POST['uname']);
    157         $passwrd = trim($_POST['pwd']);
    158         $dbhost  = trim($_POST['dbhost']);
     155        $dbname  = trim(stripslashes($_POST['dbname']));
     156        $uname   = trim(stripslashes($_POST['uname']));
     157        $passwrd = trim(stripslashes($_POST['pwd']));
     158        $dbhost  = trim(stripslashes($_POST['dbhost']));
    159159        $prefix  = trim($_POST['prefix']);
    160160        if ( empty($prefix) )
    161161                $prefix = 'wp_';