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

   ## What is the purpose of the change
   
   Two hardening fixes for the DLQ export endpoint:
   
   1. The export filename was built by string concatenation into the 
Content-Disposition header, so group names containing quotes, backslashes or 
control characters produced an invalid header, and non-ASCII names were mangled 
(#2489).
   2. The scan already knows whether the export hit the cap or lost queues, but 
the endpoint only returned the message array, so a truncated export was 
indistinguishable from a complete one (#2490).
   
   ## Brief changelog
   
   - build the attachment header with Spring ContentDisposition: ASCII names 
are emitted verbatim, header-unsafe characters are replaced, and non-ASCII 
names additionally get an RFC 5987 `filename*` parameter
   - `exportMessages` now returns a `DLQExportResultVO` carrying the messages 
plus `truncated` / `failedQueueCount` / `limit`; the downloaded JSON file stays 
a plain message array
   - the controller reports the completeness metadata via 
`X-DLQ-Export-Truncated`, `X-DLQ-Export-FailedQueues` and `X-DLQ-Export-Limit` 
response headers
   - frontend: `exportDLQMessages` returns the blob together with the metadata, 
and the DLQ page shows a warning when the export may be incomplete
   
   ## How was this patch verified
   
   - server: DLQ suites green (DLQControllerTest 13, DLQServiceTest, 
DLQProviderStubTest, RocketMQDLQProviderTest 21); full `mvn test` ran 1501 
tests with only the 7 pre-existing environment failures in the CLI agent tests 
(missing `sh` binary on a Windows machine, identical on the clean base)
   - web: vitest DLQ suites 20/20, `tsc -b` clean, ESLint clean
   
   Fixes #2489
   Fixes #2490
   


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