Skip to content

Commit

Permalink
Correctly remove password component from SQLAlchemy URLs, preventing …
Browse files Browse the repository at this point in the history
…invalid characters in SQLAlchemy subsegment names
  • Loading branch information
WFT authored and chanchiem committed Feb 20, 2019
1 parent 3801f34 commit f2a8e19
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 f2a8e19

Please sign in to comment.