Skip to content

Fixing security and quality issues#21

Merged
TechHutTV merged 1 commit into
mainfrom
fix/flaws-and-more
Mar 9, 2026
Merged

Fixing security and quality issues#21
TechHutTV merged 1 commit into
mainfrom
fix/flaws-and-more

Conversation

@TechHutTV
Copy link
Copy Markdown
Contributor

@TechHutTV TechHutTV commented Mar 9, 2026

Summary

Fixes 8 security and quality audit issues across the backend and frontend, ranging from critical vulnerabilities to low-priority type safety improvements.

Critical

  • Path traversal guard in storage providerLocalStorageProvider.read/readStream/delete/exists now resolve paths and reject any that escape the root directory.
  • Authenticate workspace file routeGET /storage/:workspaceId/uploads/* now requires authentication, verifies workspace membership, and rejects traversal attempts.

High

  • Instance admin privilege escalation — Replaced the flawed "admin of any workspace = instance admin" check with a dedicated isInstanceAdmin boolean on the User model. First registered user is automatically granted instance admin. Includes migration.

Medium

  • OIDC return URL validation — Added sanitizeReturnUrl() that rejects //, \, and null bytes in both raw and decoded form. Applied in login and callback handlers.
  • Await email sending — Three fire-and-forget sendVerificationEmail/sendPasswordResetEmail calls now use await to surface unhandled promise rejections.
  • Rate limit workspace creationPOST /api/workspaces is now rate-limited to 5 requests per minute per client.

Low

  • Remove as any in backup services — Introduced typed helpers (toCustomFieldType, toPriority, toJsonValue) and narrowed conditional includes with inline type annotations, eliminating all as any casts.
  • ESLint disable in page lock hook — Replaced the eslint-disable-line suppression with useRef-based tracking so the cleanup effect reads latest values without needing them as dependencies.

@TechHutTV TechHutTV changed the title Bulk Issue Fixes Fixes 8 ecurity and quality audit issues Mar 9, 2026
@TechHutTV TechHutTV changed the title Fixes 8 ecurity and quality audit issues Fixing security and quality issues Mar 9, 2026
@TechHutTV TechHutTV merged commit 51b1877 into main Mar 9, 2026
1 check passed
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