Aias00 opened a new pull request, #916:
URL: https://github.com/apache/rocketmq-dashboard/pull/916

   ### What is changed
   
   This PR fixes #915 by copying K8s certificate SAN arrays before storing them 
in the web mock service.
   
   ### Why
   
   `createK8sCert()` and `updateK8sCert()` returned defensive copies, but the 
mock store kept the caller-provided `san` array reference. If the caller 
mutated the request array later, stored certificate state changed without 
another service call.
   
   ### How it is fixed
   
   - Copy `data.san` on mock certificate create.
   - Copy `data.san` on mock certificate update.
   - Add a regression test that mutates both create/update request arrays after 
the service calls and verifies stored state remains unchanged.
   
   ### Verification
   
   - `npm test -- --run src/services/clusterService.test.ts`
   - `git diff --check`
   - `npm run lint -- src/services/clusterService.ts 
src/services/clusterService.test.ts` (passes with existing fast-refresh 
warnings in unrelated files)
   


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