pilichoumao opened a new issue, #6923:
URL: https://github.com/apache/rocketmq-dashboard/issues/6923

   ### Search before asking
   
   Searched existing issues/PRs for DingTalk errcode, fractions and underflow. 
#5493 addresses encoded request URIs and explicitly leaves response validation 
unchanged; #4291 concerns percentage formatting in notification bodies.
   
   ### Environment and reproduction
   
   `rocketmq-studio` at c34535db0819d02f68e50a856cb3d2614f0dc5dd, JDK 21.
   
   Return an HTTP 200 webhook response containing `{"errcode":0.5}` or 
`{"errcode":-0.5}`. `validateDingTalkResponse` checks `canConvertToInt()` and 
`asInt() == 0`, truncating both nonzero values to zero. `{"errcode":1e-400}` is 
also accepted after floating-point underflow. Queued dispatch records 
`DELIVERED`; the test-notification entry point reports success as well.
   
   Expected: only an actual numeric zero is treated as acceptance. Preserve the 
existing success behavior for `0` and `0.0`, while rejecting nonzero numeric 
responses and keeping the retry/failure behavior for missing, null, string and 
malformed values.
   
   ### Scope and evidence
   
   This is defensive handling of unexpected peer responses. There is no 
evidence that the actual DingTalk service emits fractional error codes, and 
this report does not claim a common production incident or security 
vulnerability. The official API lists numeric errcode and shows zero on 
success: https://developer.alibaba.com/doc2/apiDetail.htm?apiId=37246.
   
   An ECS probe through production dispatch reproduced three failures with 
seven controls passing. A temporary prototype retained fractional response 
values with BigDecimal and compared numerically to zero: all ten cases and the 
existing 46 notification tests passed. It used MockRestServiceServer and mocked 
persistence, with no live DingTalk requests.
   
   Proposed small fix: preserve response numeric precision during parsing and 
require numeric zero; regress both test notification and queued delivery. No 
protocol, dependencies, settings, retry model or request signing changes. AI 
assistance was used for investigation and verification.
   


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