X-LightYear opened a new issue, #7292:
URL: https://github.com/apache/rocketmq-dashboard/issues/7292

   ### Problem
   
   `rmqctl config set-context --server` accepts a relative value such as 
`studio.example.com` and persists it as a context server. The configured target 
is later rejected by the request path because it is not an absolute Studio 
Server URL.
   
   ### Reproduction
   
   ```text
   rmqctl config set-context prod --server studio.example.com --access-key-env 
RMQ_AK --secret-key-env RMQ_SK
   ```
   
   On `rocketmq-studio` at `127c47b06a268cc74224d5f34c56ec7c36ac0d55`, the 
command exits successfully and writes the context.
   
   ### Expected behavior
   
   `set-context` rejects a server value without a URL scheme and host before 
writing the configuration.
   
   ### Actual behavior
   
   The malformed value is saved, and the failure is deferred until a command 
uses the context.
   
   ### Fix
   
   Validate that a changed `--server` value has both a scheme and hostname 
before persisting it. Add a regression test that also verifies rejected 
creation does not write a config file.
   
   ### Verification
   
   - pre-fix regression: failed because the command accepted the relative value
   - focused regression and related config tests: passed
   - `go test ./rmqctl/cmd`: passed
   - full `go test ./...`: package tests passed; existing Windows/WSL 
build-script and binary-license packaging tests remain environment/tooling 
failures


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