Skip to content

Commit

Permalink
Merge pull request #95 from aiven/security-fix-for-mysql-connector
Browse files Browse the repository at this point in the history
Insecure parameters for MySQL DB JDBC connection
  • Loading branch information
ivanyu authored Jul 7, 2021
2 parents 4b88de6 + 5e1b512 commit 747d286
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collection;
import java.util.Properties;

import org.apache.kafka.connect.data.Date;
import org.apache.kafka.connect.data.Decimal;
Expand Down Expand Up @@ -123,6 +124,14 @@ protected String getSqlType(final SinkRecordField field) {
}
}

@Override
protected Properties addConnectionProperties(final Properties properties) {
properties.put("allowLoadLocalInFile", Boolean.FALSE.toString());
properties.put("allowUrlInLocalInfile", Boolean.FALSE.toString());
properties.put("autoDeserialize", Boolean.FALSE.toString());
return properties;
}

@Override
public String buildUpsertQueryStatement(
final TableId table,
Expand Down

0 comments on commit 747d286

Please sign in to comment.