Skip to content

Commit

Permalink
[mysql] unquote password before sending to client
Browse files Browse the repository at this point in the history
so we can %encode passwords with symbols like # : in them
  • Loading branch information
dufferzafar authored and saulpw committed Jun 24, 2023
1 parent 08c4e00 commit cdfe4af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions visidata/loaders/mysql.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from contextlib import contextmanager
from urllib.parse import urlparse
from urllib.parse import urlparse, unquote

from visidata import VisiData, vd, Sheet, anytype, asyncthread, ColumnItem

Expand Down Expand Up @@ -42,7 +42,7 @@ def cur(self, qstr):
database=self.url.path[1:],
host=self.url.hostname,
port=self.url.port or 3306,
password=self.url.password,
password=unquote(self.url.password),
use_unicode=True,
charset='utf8',
cursorclass=cursors.SSCursor) ## if SSCursor is not used mysql will first fetch ALL data, and only then visualize it
Expand Down

0 comments on commit cdfe4af

Please sign in to comment.