When a mysql password contains +, it appears to not be handled correctly.
I am encoding the password that I pass via --url so that + becomes %2B. I can see that after url.Parse() in main.go this gets converted back to +. The problem is that the mysql Driver calls url.QueryUnescape(), after which the + becomes a single space.
If I don't encode the +, url.Parse() leaves it as is, but url.QueryUnescape() converts it to a single space, as in the first case.
I've experimented with url.PathUnescape(), and when this is used, everything seems to work properly. It seems like this is a safe switch to make since the documentation says:
PathUnescape is identical to QueryUnescape except that it does not unescape '+' to ' ' (space).
I can see that this change was introduced in #76. @kriive care to weigh on this?
When a mysql password contains
+, it appears to not be handled correctly.I am encoding the password that I pass via
--urlso that+becomes%2B. I can see that afterurl.Parse()in main.go this gets converted back to+. The problem is that the mysqlDrivercallsurl.QueryUnescape(), after which the+becomes a single space.If I don't encode the
+,url.Parse()leaves it as is, buturl.QueryUnescape()converts it to a single space, as in the first case.I've experimented with
url.PathUnescape(), and when this is used, everything seems to work properly. It seems like this is a safe switch to make since the documentation says:I can see that this change was introduced in #76. @kriive care to weigh on this?