Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDBC detector matches & attempts to verify empty connection strings #3704

Open
rgmz opened this issue Dec 1, 2024 · 2 comments
Open

JDBC detector matches & attempts to verify empty connection strings #3704

rgmz opened this issue Dec 1, 2024 · 2 comments
Labels

Comments

@rgmz
Copy link
Contributor

rgmz commented Dec 1, 2024

The JDBC detector matches results with no actual connection string (e.g., jdbc:postgresql://), resulting in extraneous verification attempts with no/default information.

MySQL

Found unverified result πŸ·πŸ”‘β“
Verification issue: dial tcp 127.0.0.1:3306: connect: connection refused
Detector Type: JDBC
Decoder Type: PLAIN
Raw result: jdbc:mysql://
File: dataduct/pipeline/mysql_node.py
Line: 37
Link: https://github.com/recurly/dataduct/blob/d0f94a199ca694260dac98c8bf1ec4af2ce1adf3/dataduct/pipeline/mysql_node.py#L37
Repository: https://github.com/recurly/dataduct.git
Timestamp: 2018-07-13 21:15:36 +0000

Postgres

Found unverified result πŸ·πŸ”‘β“
Verification issue: dial tcp [::1]:5432: connect: connection refused
dial tcp [::1]:5432: connect: connection refused
Detector Type: JDBC
Decoder Type: PLAIN
Raw result: jdbc:postgresql://
Commit: 949ac19005d982b2e7ed75cce43d867a17047b52
File: src/main/java/com/impossibl/postgres/jdbc/AbstractDataSource.java
Line: 241
Link: https://github.com/NinjaRMM/pgjdbc-ng/blob/949ac19005d982b2e7ed75cce43d867a17047b52/src/main/java/com/impossibl/postgres/jdbc/AbstractDataSource.java#L241
Repository: https://github.com/NinjaRMM/pgjdbc-ng.git
Timestamp: 2013-11-01 03:31:20 +0000
@rgmz rgmz added the bug label Dec 1, 2024
@kashifkhan0771
Copy link
Contributor

Should we check this in the code logic and filter out the invalid ones? e.g

// isEmptyConnectionString check if the connectionString has something after "://"
func isEmptyConnectionString(connStr string) bool {
	parts := strings.Split(connStr, "://")
	return len(parts[1]) > 0

}

@rgmz
Copy link
Contributor Author

rgmz commented Jan 2, 2025

Imo both this and #1458 are pattern issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants