[CONJ-114] Usage of the Connection Pool Apache DBCP breaks because of deleted username/password Created: 2014-09-26 Updated: 2015-11-18 Resolved: 2014-10-21 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | 1.1.7 |
| Fix Version/s: | 1.1.8 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Lennart Schedin | Assignee: | Massimo Siani (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
How to reproduce:
Actual: The test case testConnectionWithSimululatedApacheDBCP() will fail when creating the second Connection (row 62). Both test cases will fail with the Exception:
(and some more rows of exception) Expected: Analysis:
that was added as a fix for https://mariadb.atlassian.net/browse/CONJ-89 that is the problem. I think the removing of user and password was added as a type of security so that a call to connection.getClientInfo("password") would not disclose the password?! The code removes the user and password from the Properties data structure in MySQLConnection. The problem is that Apache DBCP has a reference to this object. Thus, MySQLConnection is changing in the data structure that is “owned” by DriverConnectionFactory. One might argue that it is debatable if the caller of the calling method should own a parameter. But since I don’t feel like changing in the Apache DBCP source code I would argue that one possible solution is for MariaDB to copy the data structure before altering it. |
| Comments |
| Comment by Massimo Siani (Inactive) [ 2014-09-29 ] |
|
Since MySQL JDBC works with the Apache lib, I think we have to revert those two lines from |