dengliming opened a new issue, #643:
URL: https://github.com/apache/shenyu-dashboard/issues/643

   ## Description
   `initSecret()` is called once at module load and never awaited or retried. 
If `/platform/secretInfo` fails or has not resolved when the user submits, 
`secretKey` is still `""` and the password is sent unencrypted; the server 
fails to decrypt and login fails until a full page reload. Separately, the 
login callback does `res.code === 500` and `login/login` calls the callback 
before checking the response; since `request()` resolves to `undefined` on 
non-2xx responses, an HTTP 500 from the login endpoint throws a `TypeError` in 
the saga.
   
   ## Location
   (Lines refer to `master @ 83969a5`.)
   - `src/routes/User/Login.js:31-53,96-108`
   - `src/models/login.js:31-34`
   
   ## Impact
   Login fails with no useful message when the secret endpoint is slow or the 
login endpoint errors.
   
   ## Suggested fix
   Await/retry `initSecret` inside `handleSubmit` before encrypting, and guard 
`res?.code` (see also the `request()` error-handling issue).
   
   ## Related existing
   None
   


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