Claus Ibsen created CAMEL-26268:
-----------------------------------

             Summary: camel-huaweicloud-obs - putObject with a File body and no 
bucketName skips the bucket check and calls headBucket(null)
                 Key: CAMEL-26268
                 URL: https://issues.apache.org/jira/browse/CAMEL-26268
             Project: Camel
          Issue Type: Bug
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of hwcloud-obs (CAMEL-24961, PR 
#28406).

h4. 1. putObject with a File body skips the bucket name check

{{OBSProducer.putObject}} (main 2a465aa4814c, lines 122-125) skips the "Bucket 
and object names are mandatory" check when the body is a {{File}}, though only 
the object name can come from the file; with no bucket name it goes on to 
{{obsClient.headBucket(null)}} (line 129) and fails with an SDK error. Read in 
the code, not run.

Proposed: check the bucket name in all cases, and the object name only when the 
body is not a File.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to