Skip to content

Commit f2a8e19

Browse files
WFTchanchiem
authored andcommitted
Correctly remove password component from SQLAlchemy URLs, preventing invalid characters in SQLAlchemy subsegment names
1 parent 3801f34 commit f2a8e19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aws_xray_sdk/ext/sqlalchemy/util/decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def parse_bind(bind):
104104
# Strip password from URL
105105
host_info = u.netloc.rpartition('@')[-1]
106106
parts = u._replace(netloc='{}@{}'.format(u.username, host_info))
107-
safe_url = u.geturl()
107+
safe_url = parts.geturl()
108108
sql = {}
109109
sql['database_type'] = u.scheme
110110
sql['url'] = safe_url

0 commit comments

Comments
 (0)