Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Issue #129 (MySqlStreamer fails on warning with mysql version 5.6.10) #130

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

keithlayne
Copy link

This changes MySqlStreamer to pass a temporary option file to the mysql binary. This addresses the potential security vulnerability caused by passing the password on the command line. Newer versions of mysql (at least one) generate a warning in this case.

The behavior should be equivalent to the previous version, but will run on versions of mysql that generate the warning.

Keith Layne added 2 commits March 6, 2013 11:19
This is one possible fix for #129
This is (I think) a better approach towards dealing with #129.  I have
tested it a little bit, and I think it may provide a basis for dealing
with #108.  One plus is that it doesn't have to read anything magical
from stderr.

The Tempfile docs say that the file is created 0600.  I think I read
that MySQL ignores option files that are not 0600 or 0400.  I would
rather unlink the option file sooner, but I'm not sure how to do that
without creating a race condition.

I ran 'DB=mysql2 rake test' using ruby-1.9.3p392 and the only failures
I got had to do with with nokogiri.  I tested a little on my own use
case, just to make sure it looked like it was working.
@ghost ghost assigned thbar Mar 8, 2013
@thbar
Copy link
Member

thbar commented Mar 8, 2013

Thanks for this! I'll try to bring back the test suite to green this week-end then merge it.

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

Successfully merging this pull request may close these issues.

2 participants