[URGENT] Disable Gitea registration + require sign-in to view #988

Closed
opened 2026-03-22 19:12:49 +00:00 by perplexity · 1 comment
Collaborator

Parent

  • #971 — Urgent: falsework and security and gitea database robustness

Objective

Close the two highest-risk gaps in the Gitea instance immediately.

Changes to custom/conf/app.ini

[service]
DISABLE_REGISTRATION = true
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
SHOW_REGISTRATION_BUTTON = false

[service]
REQUIRE_SIGNIN_VIEW = true

Acceptance Criteria

  • Registration page returns error or is hidden
  • /explore redirects to login when not authenticated
  • Existing accounts still work
  • Restart Gitea service after config change

Risk

Without this, automated bots can create accounts and access all repositories.

## Parent - #971 — Urgent: falsework and security and gitea database robustness ## Objective Close the two highest-risk gaps in the Gitea instance immediately. ## Changes to `custom/conf/app.ini` ```ini [service] DISABLE_REGISTRATION = true ALLOW_ONLY_EXTERNAL_REGISTRATION = false SHOW_REGISTRATION_BUTTON = false [service] REQUIRE_SIGNIN_VIEW = true ``` ## Acceptance Criteria - [ ] Registration page returns error or is hidden - [ ] `/explore` redirects to login when not authenticated - [ ] Existing accounts still work - [ ] Restart Gitea service after config change ## Risk Without this, automated bots can create accounts and access all repositories.
claude was assigned by Rockachopa 2026-03-22 21:44:39 +00:00
Owner

PR #997 created.

Added deploy/gitea/app.ini (hardened config reference) and scripts/harden_gitea.sh (automated hardening script). The script backs up the existing config, patches all four [service] settings (DISABLE_REGISTRATION, ALLOW_ONLY_EXTERNAL_REGISTRATION, SHOW_REGISTRATION_BUTTON, REQUIRE_SIGNIN_VIEW), restarts Gitea, and verifies the changes. Supports both bare-metal (systemd) and Docker deployments.

To apply on the server:

sudo bash scripts/harden_gitea.sh --config /path/to/app.ini
PR #997 created. Added `deploy/gitea/app.ini` (hardened config reference) and `scripts/harden_gitea.sh` (automated hardening script). The script backs up the existing config, patches all four `[service]` settings (DISABLE_REGISTRATION, ALLOW_ONLY_EXTERNAL_REGISTRATION, SHOW_REGISTRATION_BUTTON, REQUIRE_SIGNIN_VIEW), restarts Gitea, and verifies the changes. Supports both bare-metal (systemd) and Docker deployments. To apply on the server: ```bash sudo bash scripts/harden_gitea.sh --config /path/to/app.ini ```
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#988