Skip to content

fix(auth): prevent privilege escalation through public registration - #35

Merged
puemos merged 1 commit into
mainfrom
fix/public-registration-role-escalation
Sep 4, 2026
Merged

fix(auth): prevent privilege escalation through public registration#35
puemos merged 1 commit into
mainfrom
fix/public-registration-role-escalation

Conversation

@puemos

@puemos puemos commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Ignore caller-supplied role values during public password registration and always create customer accounts.
  • Add a dedicated server-controlled action for creating the initial administrator during instance setup.
  • Update role-aware test helpers and add regression coverage for HTTP registration and initial setup.

Testing

  • mix test test/craftplan_web/controllers/auth_registration_controller_test.exs test/craftplan_web/live/setup_live_test.exs test/craftplan_web/live/manage/settings_members_live_test.exs test/craftplan_web/controllers/page_controller_test.exs --max-failures 1
  • mix test --max-failures 1
  • mix format --check-formatted
  • mix compile --warnings-as-errors

@puemos
puemos merged commit 4c31c12 into main Sep 4, 2026
1 check passed
@puemos
puemos deleted the fix/public-registration-role-escalation branch September 4, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant