mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-05-08 12:52:44 -05:00
[PR #227] [MERGED] fix: resolve CVEs, upgrade to Astro v6, and harden API security #1345
Reference in New Issue
Block a user
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?
📋 Pull Request Information
Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/227
Author: @arunavo4
Created: 3/15/2026
Status: ✅ Merged
Merged: 3/15/2026
Merged by: @arunavo4
Base:
main← Head:security/fix-vulnerabilities-and-upgrade-deps📝 Commits (5)
cf8c5ddfix: resolve CVEs, upgrade to Astro v6, and harden API securitya544b29repositories: migrate table to tanstack7a2a622Revert "repositories: migrate table to tanstack"806e0a6Merge branch 'main' into security/fix-vulnerabilities-and-upgrade-deps8f2c75efixed lock file📊 Changes
13 files changed (+662 additions, -768 deletions)
View changed files
📝
Dockerfile(+22 -3)📝
bun.lock(+529 -579)📝
package.json(+19 -15)➖
src/content/config.ts(+0 -4)📝
src/lib/api.ts(+4 -22)📝
src/lib/config.ts(+17 -2)📝
src/lib/utils.ts(+3 -1)📝
src/lib/utils/encryption.ts(+16 -3)📝
src/pages/api/auth/check-users.ts(+3 -10)📝
src/pages/api/auth/debug.ts(+17 -54)📝
src/pages/api/cleanup/auto.ts(+8 -5)📝
src/pages/api/config/index.ts(+18 -0)📝
src/pages/api/health.ts(+6 -70)📄 Description
Summary
Docker Image CVE Fixes
API Security Hardening
/api/auth/debug/api/auth/check-usershasUsers: booleaninstead of exact user count/api/cleanup/auto/api/health/api/configBETTER_AUTH_SECRETCrypto Fixes
generateRandomString(): replacedMath.random()withcrypto.getRandomValues()— this was used to generate OAuth client secretshashValue(): added random salt +verifyHash()with timing-safe comparisonBackward Compatibility
All changes are backward compatible with existing deployments:
--spider(status code only), UI only reads version fieldsBETTER_AUTH_SECRET: warns instead of crashing — existing users keep workingTest plan
bun run build— passesbun test— 163 pass, 0 faildocker build -t gitea-mirror:test .)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.