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

   ## Affected branch
   
   `rocketmq-studio` at `e1072d2759804db5439da390f8c1602e4657a8a4`
   
   ## Problem
   
   Studio uses browser Web Storage for authentication, preferences, message 
query history, and Proxy context. Most callers handle storage failures locally, 
but the API request interceptor and the Proxy page still access `localStorage` 
directly. Browsers can throw `SecurityError` when storage is blocked, including 
privacy-restricted or sandboxed contexts.
   
   A failed token read rejects every API request before it is sent. A failed 
Proxy cluster read throws during render, so that page cannot open. The repeated 
per-feature `try/catch` blocks also make it easy for new storage callers to 
miss the fallback contract.
   
   ## Expected behavior
   
   The UI should remain usable with in-memory/default state when Web Storage 
cannot be read or written. Storage failures must not prevent API requests, 
application startup, or page rendering.
   
   ## Proposed scope
   
   - Centralize safe local-storage reads, writes, and removals.
   - Route all production storage callers through the shared helper.
   - Keep the existing in-memory/default behavior for auth, language, theme, 
query history, and Proxy context.
   - Add regression coverage for blocked storage in the request interceptor and 
Proxy initialization.
   
   ## Reproduction
   
   Make `localStorage.getItem` throw a `SecurityError`, then issue an API 
request or open the Proxy page. The request interceptor rejects before Axios 
sends the request, and Proxy rendering fails while initializing `clusterId`.


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