Gabriel39 commented on PR #71221: URL: https://github.com/apache/doris/pull/71221#issuecomment-7372148756
Two concerns on `dec30a43a4093c0df532a584bb99f1d7a49312ce`: 1. **[Major] Validate both supported interpretations of quoted `address=` host properties.** [`findHostPropertyEnd()`](https://github.com/apache/doris/blob/dec30a43a4093c0df532a584bb99f1d7a49312ce/fe/fe-foundation/src/main/java/org/apache/doris/foundation/security/JdbcDriverUrlSecurity.java#L228-L234) skips delimiters until the matching quote, following Connector/J 5.1 semantics. However, Connector/J 8.4's [`ADDRESS_EQUALS_HOST_PTRN`](https://github.com/mysql/mysql-connector-j/blob/8.4.0/src/main/core-api/java/com/mysql/cj/conf/ConnectionUrlParser.java#L91) terminates a value at the closing parenthesis without that quotation handling. Consequently, an accepted quoted span can contain a restricted host property that Doris treats as ordinary value text but the 8.4 driver parses separately. The appended query-level `allowLoadLocalInfile=false` does not repair this: [host properties override global properties](https://github.com/mysql/mysql-connector-j/blob/8.4.0/src/main/core-api/jav a/com/mysql/cj/conf/ConnectionUrl.java#L474-L480). This is a policy-enforcement issue for accepted input, distinct from the earlier safe-legacy-input rejection discussion. Please validate both host grammars, or reject ambiguous forms, and add differential tests that inspect the final host properties from Connector/J 5.1.49 and 8.4.0. Those tests can run without a database connection; checking only the URL returned by the Doris parser misses this discrepancy. 2. **[Minor] Increment the Connector SPI API major for the new public methods.** This adds [`withMysqlJdbcUrlKeys()`](https://github.com/apache/doris/blob/dec30a43a4093c0df532a584bb99f1d7a49312ce/fe/fe-connector/fe-connector-spi/src/main/java/org/apache/doris/connector/spi/ConnectorSecuritySurface.java#L190-L192) and `mysqlJdbcUrlKeys()` and updates the API surface baseline, while [`connector.plugin.api.version`](https://github.com/apache/doris/blob/dec30a43a4093c0df532a584bb99f1d7a49312ce/fe/fe-connector/pom.xml#L48-L58) remains `42.0`. The repository contract requires a major increment for public SPI additions. The paired-package limitation is documented, but the unchanged major cannot enforce that boundary: an older JDBC provider can pass the version gate without declaring the new policy keys. Please update the API major and its pinned test expectation together. These findings are based on static source review, including the two Connector/J source artifacts. I did not execute driver/parser tests or connect to a database. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
