davsclaus opened a new pull request, #24707:
URL: https://github.com/apache/camel/pull/24707

   ## Summary
   
   _Claude Code on behalf of davsclaus_
   
   The `verifyTableName` regex in `JdbcAggregationRepository` rejected 
schema-qualified table names like `myschema.camel_agg` because the pattern 
`[a-zA-Z_][a-zA-Z0-9_]*` does not allow dots. This is an unreleased regression 
from commit 1d2568f00236.
   
   - Updated the regex to accept an optional schema qualifier: 
`[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]*)?`
   - Added 12 unit tests covering valid names (simple, underscored, 
schema-qualified) and invalid names (SQL injection, empty, leading digit, 
double dot, trailing dot, leading dot, three-part names)
   - Added upgrade guide entry in `camel-4x-upgrade-guide-4_22.adoc`
   
   Fixes: [CAMEL-24047](https://issues.apache.org/jira/browse/CAMEL-24047)
   
   ## Test plan
   
   - [x] `JdbcAggregationRepositoryVerifyTableNameTest` — 12 tests all pass
   - [x] Simple names like `aggregation` still accepted
   - [x] Schema-qualified names like `myschema.camel_agg` now accepted
   - [x] SQL injection attempts like `foo; DROP TABLE bar` still rejected
   - [x] Three-part names like `catalog.schema.table` correctly rejected (only 
one dot allowed)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to