fix: disinto init change-password triggers must_change_password despite --must-change-password=false #267
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#267
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
During
disinto init, when the admin user already exists, the code resets the password at line ~712:Despite passing
--must-change-password=false, Forgejo 11.x sometimes still sets the must_change_password flag. This blocks subsequent API calls with:The flag defaults to
truein the Forgejo CLI, and=falsemay not be parsed correctly in all Forgejo versions.Observed behavior
Init resets password, then immediately tries basic auth for token creation — gets 403 "must change password". This blocks the entire init flow.
Proposed solution
After the change-password call, explicitly clear the flag using the Forgejo admin API (which is more reliable than the CLI flag):
Alternatively, skip the password reset entirely when basic auth already works:
The second approach is simpler and avoids the problem entirely.
Affected files
Acceptance criteria
disinto initre-run does not trigger must_change_password lockoutBlocked — issue #267
no_push2026-04-06T06:39:13ZDiagnostic output
Blocked — issue #267
no_push2026-04-06T07:45:17ZDiagnostic output