Skip to content

Conversation

@MegaphoneJon
Copy link
Contributor

If you have globbing characters (e.g. *) in your MySQL password, cv will fail to connect. Quoting the password in the generated defaults-file fixes the problem and seems to have no ill effect.

$data .= "host={$this->host}\n";
$data .= "user={$this->username}\n";
$data .= "password={$this->password}\n";
$data .= "password='{$this->password}'\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

I suppose one could have a password with a quote mark? Do you happen to know what escaping rules they use MySQL's file-format? Maybe addslashes() or addcslashes() would come closer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants