Skip to content
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

Silently ignores "; host=$hostname" #331

Open
drboone opened this issue Jun 17, 2021 · 2 comments
Open

Silently ignores "; host=$hostname" #331

drboone opened this issue Jun 17, 2021 · 2 comments
Labels

Comments

@drboone
Copy link

drboone commented Jun 17, 2021

Not sure if this is a DBI or DBD::mysql issue.

A DSN like "dbi:mysql:$database; host=$hostname" will silently ignore the host= clause and connect to localhost. This is bad juju: one could end up making changes to the wrong database. It's also a serious violation of "principle of least astonishment. The DSN should either be accepted and used fully, or rejected fully, not selectively ignored.

@drboone drboone changed the title Silently ignores "; hostname=xyz" Silently ignores "; host=$hostname" Jun 17, 2021
@dveeden
Copy link
Collaborator

dveeden commented Jun 18, 2021

So the issue here is the space in front of host?

@drboone
Copy link
Author

drboone commented Jun 18, 2021

Seems to be.

@dveeden dveeden added the bug label Jun 18, 2021
@ghost ghost mentioned this issue Jun 23, 2021
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