8000 [repair_settings] database passwords with semi-colons · Issue #1 · emanuele45/tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[repair_settings] database passwords with semi-colons #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
emanuele45 opened this issue May 6, 2012 · 1 comment
Open

[repair_settings] database passwords with semi-colons #1

emanuele45 opened this issue May 6, 2012 · 1 comment
Labels

Comments

@emanuele45
Copy link
Owner

I feel this version still suffer the problem that when the database password contains a semi-colon it is not read correctly...the fix should be somewhere in one of the team boards...

emanuele45 pushed a commit that referenced this issue Dec 7, 2012
emanuele45 pushed a commit that referenced this issue Jul 4, 2013
Fix slashes for windows
@margarett
Copy link

@emanuele45 your current code does handle passwords with double quotes and semi-colons correctly. However, it damages Windows paths because a double backlash is required and you are only using addcslashes to escape quotes. You have this

    foreach ($_POST as $k => $v)
    {
        if (is_array($v))
            foreach ($v as $k2 => $v2)
                $_POST[$k][$k2] = addcslashes($v2, '\'');
        else
            $_POST[$k] = addcslashes($v, '\'');
    } 

And you need

    foreach ($_POST as $k => $v)
    {
        if (is_array($v))
            foreach ($v as $k2 => $v2)
                $_POST[$k][$k2] = addcslashes($v2, '\'\\');
        else
            $_POST[$k] = addcslashes($v, '\'\\');
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0