yyqdbngt opened a new issue, #2346: URL: https://github.com/apache/rocketmq-dashboard/issues/2346
### Description An instance-scoped route containing an invalid percent-encoded instance id can crash the page during render. `useInstanceFilter` calls `decodeURIComponent` directly on the route segment, so a URL such as `/instance/%E0%A4%A/topic` throws `URIError: URI malformed` before the hook can load the instance list and recover to a valid instance. This can be triggered by a truncated link, a manually edited URL, or an incorrectly encoded external link. ### Expected behavior A malformed instance id should be treated as an unknown route value. Once the instance list is available, the existing fallback should replace the route with the first valid instance instead of leaving the instance page blank. ### Proposed fix Decode the route segment defensively and add a router-level regression test for a malformed encoded segment. -- 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]
