Third audit: security and server-side scalability (v1.11.0-audit) #22

Merged
ngu-git-admin merged 2 commits from audit-3 into main 2026-10-02 01:41:36 +01:00

Third audit (TODO.md, Audits): security after the Google Drive integration and in general, and scalability at hundreds of records. This branch is the server-side half; the UI half (carousel, map search, pickers, media thumbnails) is its own branch next.

Security

  • Word import: each .docx part unpacked once (a repeated entry was a zip bomb reachable from the public request form)
  • Request form files must be named for their type (a PDF named .html is refused)
  • /teams/:id/people hidden when the team's organization is unpublished
  • /people?ids= no longer names draft organizations; takes 200 ids (was 50)
  • Migration 059: v_events takes the first published host (a draft partner's name and logo leaked into an event's preview) and reads event_hosts directly, about 18x faster per lookup; index on person_awards.event_id
  • Group accounts refused at Google sign-in while access groups are off; group sync can't undo a superadmin's disable
  • 64 KB body limit on login, feedback and csp-report
  • Drive pick-up races no longer 500; random multipart boundary

Scalability

  • /events filters by scope, host, status and type on the server; each band fetches its own; Home no longer prefetches every event
  • /organizations leaves out bodies and leadership; the map's group panel fetches its group
  • Admin lists: real total, offset paging, "Show more" with "N of M"
  • Content requests record search queries by name; newsletter asks for published posts only

Checked

pnpm exec tsc passes; migrations through 059 and the changed routes tested against an in-memory database. Not run in a browser yet.

Deploy

Back up the database first (migration 059 recreates a view and adds an index).

🤖 Generated with Claude Code

Third audit (TODO.md, Audits): security after the Google Drive integration and in general, and scalability at hundreds of records. This branch is the server-side half; the UI half (carousel, map search, pickers, media thumbnails) is its own branch next. ## Security - Word import: each .docx part unpacked once (a repeated entry was a zip bomb reachable from the public request form) - Request form files must be named for their type (a PDF named .html is refused) - `/teams/:id/people` hidden when the team's organization is unpublished - `/people?ids=` no longer names draft organizations; takes 200 ids (was 50) - Migration 059: `v_events` takes the first published host (a draft partner's name and logo leaked into an event's preview) and reads event_hosts directly, about 18x faster per lookup; index on `person_awards.event_id` - Group accounts refused at Google sign-in while access groups are off; group sync can't undo a superadmin's disable - 64 KB body limit on login, feedback and csp-report - Drive pick-up races no longer 500; random multipart boundary ## Scalability - `/events` filters by scope, host, status and type on the server; each band fetches its own; Home no longer prefetches every event - `/organizations` leaves out bodies and leadership; the map's group panel fetches its group - Admin lists: real total, offset paging, "Show more" with "N of M" - Content requests record search queries by name; newsletter asks for published posts only ## Checked `pnpm exec tsc` passes; migrations through 059 and the changed routes tested against an in-memory database. Not run in a browser yet. ## Deploy Back up the database first (migration 059 recreates a view and adds an index). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ngu-git-admin added 2 commits 2026-10-02 00:46:01 +01:00
Security:
- docx unzip reads each part once (a repeated entry was a zip bomb)
- request files must be named for their type (no PDF named .html)
- team roster hidden when its organization is unpublished
- /people?ids= hides draft organizations, takes 200 ids
- v_events takes the first published host and reads event_hosts
  directly (migration 059, plus an index on person_awards.event_id)
- group accounts refused while access groups are off; group sync
  can't undo a superadmin's disable
- 64 KB body limit on login, feedback and csp-report
- Drive pick-up races no longer 500; random upload boundary

Scalability:
- /events filters by scope, host, status and type on the server;
  Home no longer prefetches every event
- /organizations leaves out bodies and leadership; the map's group
  panel fetches its own
- admin lists page with Show more and a real count
- content request record search and the newsletter's post list
  ask the server

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ngu-git-admin merged commit 0373f7bde6 into main 2026-10-02 01:41:36 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ngu-git-admin/NGU-Web#22
No description provided.