#10353·halo

Console password changes should not require sudo verification

Author: ruibabyCreated Sep 28, 2026Updated Sep 29, 2026
Labelskind/bugarea/console

Prerequisites

  • I have searched for related issues in the issues list.
  • This is an issue with the Halo project itself.
  • I have tried disabling all plugins to rule out plugins as the cause of the problem.
  • This issue does not concern a plugin or theme.

System information

  • Source version: 2.27.0-SNAPSHOT
  • Git commit: fe77aacf8
  • Java used for verification: Amazon Corretto 21.0.9
  • Actuator information: Not available; reproduced against the source checkout with automated tests.

What is the project operation method?

Source Code

What happened?

Changing a user's password in Console prompts the administrator for sudo verification when email or TOTP verification is available and the current session has no active sudo window. Console password changes should be governed by the applicable administrator permissions without an additional sudo verification step. Password changes in User Center should continue to require sudo verification.

The Console password endpoints are included in SudoModeWebFilter's sensitive path matcher. A request to either /apis/api.console.halo.run/v1alpha1/users/{name}/password or /apis/api.console.halo.run/v1alpha1/users/-/password returns a 403 response with the sudo-required problem type before reaching the endpoint; the UI then opens the verification dialog.

Reproduce Steps

  1. Sign in to Console as an administrator with email or TOTP verification available.
  2. Ensure the session has no active sudo window.
  3. Open User Management, select a user, and choose to change their password.
  4. Submit the new password. A sudo verification dialog appears.

Relevant log output

No application logs captured.

Additional information

SudoModeIntegrationTest.shouldReportSudoRequiredForSensitiveApis currently expects the sudo-required response for both Console password paths. I ran this test and SudoModeWebFilterTest.shouldMatchSensitivePaths; both passed, confirming that the behavior is enforced by the backend matcher. The integration test uses a mock user and does not depend on installed plugins.