1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Installer escapes double quote

Discussion in 'Resolved Bug Reports' started by Jake B., Jan 14, 2015.

  1. Jake B.

    Jake B. Well-Known Member

    Currently the XenForo installer escapes the double quote with a backslash if it's used in your database password, even though it is stored in single quotes which prevents installation from taking place. It's caused in library/XenForo/Install/Model/Install.phph on line 392:
    $lines[] = '$config[\'' . addslashes($key) . '\'][\'' . addslashes($subKey) . '\'] = \'' . addslashes($subValue) . '\';';
    And should probably use something like this:
    $str = str_replace('\'', '\\\'', str_replace('\\', '\\\\', $str));
    Since there is no reason to escape double quotes in this circumstance.
  2. Mike

    Mike XenForo Developer Staff Member

    I actually just switched it to addcslashes() as it's a bit more succinct, but fixed now thanks. :)

Share This Page