Skip to content

Commit

Permalink
Merge pull request aws#132 from WFT/fix-sqlalchemy-patching-url
Browse files Browse the repository at this point in the history
Correctly remove password component from SQLAlchemy URLs, preventing …
  • Loading branch information
chanchiem authored Feb 16, 2019
2 parents dcb0801 + 0134819 commit 237f8c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws_xray_sdk/ext/sqlalchemy/util/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def parse_bind(bind):
# Strip password from URL
host_info = u.netloc.rpartition('@')[-1]
parts = u._replace(netloc='{}@{}'.format(u.username, host_info))
safe_url = u.geturl()
safe_url = parts.geturl()
sql = {}
sql['database_type'] = u.scheme
sql['url'] = safe_url
Expand Down

0 comments on commit 237f8c7

Please sign in to comment.