zivali commented on issue #4211: URL: https://github.com/apache/gravitino/issues/4211#issuecomment-2250159499
Per my understanding, `JdbcDatabaseOperations.delete` currently will only be called by the `dropSchema`. During the `dropSchema` API call, the data will be routed to `SchemaNormalizeDispatcher`, in which we apply the capability formwork with [CapabilityHelpers.applyCapabilities](https://github.com/apache/gravitino/blob/main/core/src/main/java/org/apache/gravitino/catalog/CapabilityHelpers.java#L103-L110). This uses a whitelist approach to validate names. Tests cover some malicious SQL can be found in [CatalogMysqlIT](https://github.com/apache/gravitino/blob/main/catalogs/catalog-jdbc-mysql/src/test/java/org/apache/gravitino/catalog/mysql/integration/test/CatalogMysqlIT.java#L1529-L1570) I think if we assume `JdbcDatabaseOperations.delete` will be called by any other class in the future and won't be routed through `SchemaNormalizeDispatcher`, adding more validation here in `generateDropDatabaseSql` won't hurt. -- 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]
