146 Commits
Author SHA1 Message Date
Marrrrrrrrry 61d72ab6cc perf: cache settings refresh behind a 2s TTL, force refresh on write paths (D6) 2026-09-09 18:47:40 +08:00
Marrrrrrrrry 5121db6edc feat: rename all config keys to snake_case with DB migration 007
- 20 camelCase keys (uploadSize, expireStyle, openUpload, ...) renamed across
  DEFAULT_CONFIG, settings accessors, setup form fields, and ConfigService
- migrations_007 renames keys inside the existing settings KeyValue row,
  preserving all values for existing deployments
- schema guard meta-test keeps future keys declared
2026-09-09 18:09:19 +08:00
Marrrrrrrrry 61724cbf32 chore: warn at startup when multi-worker deployment weakens in-process rate limiting 2026-09-09 17:37:06 +08:00
Marrrrrrrrry 6587ec86be refactor: extract setup wizard and public pages from main.py (945 -> 148 lines)
- apps/base/setup_wizard.py: form parsing rules, setup options, and the
  two admin-facing HTML pages
- apps/base/pages.py: setup/assets/index/robots/public-config routes and
  theme resolution (404 handler registered on the app in main.py)
- tests updated to import from the new modules
2026-09-09 17:25:42 +08:00
Marrrrrrrrry ad3d319362 refactor: storage raises framework-neutral StorageError rendered identically by app handler 2026-09-09 17:07:43 +08:00
Marrrrrrrrry 3396644da3 refactor: move config and tasks modules from core to apps/base (core no longer imports apps) 2026-09-09 17:00:42 +08:00
Marrrrrrrrry d701c6e00e chore: engineering hardening - test tooling, lint, security fix, and cleanup
- add pyproject.toml with pytest config and dev dependency group (PEP 735)
- add ruff (core correctness rules) + pre-commit hook
- fix stored XSS: html.escape site config before index template injection,
  with regression tests
- log previously swallowed cleanup exceptions in upload rollback paths
- consolidate three duplicate path generators into build_file_path
  (also aligns chunk/presign date dirs to get_now() instead of local time)
- drop redundant ip_limit sync in load_config (refresh_settings covers all limiters)
- remove dead code (calculate_file_hash, commented-out block), two orphan
  guide docs, and stale .gitignore entries
- add dependabot for pip, docker, and github-actions
- bump starlette 1.3.1 -> 1.6.0 (no breaking API changes; verified with the
  full test suite plus an ASGI smoke test incl. Range downloads)
- skip theme asset tests when themes/ is not built locally
2026-09-07 23:43:50 +08:00
vastsa 5537f56b88 fix(logging): reduce production log noise 2026-09-01 23:56:08 +08:00
vastsa eda0a3127a fix: add magic-byte checks, login rate limits, and non-root Docker
Close the remaining security gaps: validate upload content against
file signatures, rate-limit admin login failures with configurable
thresholds, and run the container as uid 1000 instead of root.
2026-07-23 22:23:04 +08:00
vastsa a41693f90d fix: harden share expiry, download token, quota SQL, and CORS
Apply the useful security fixes from PR #494 with review corrections:
validate expire_style through a shared helper, accept previous download
token window, detect SQL dialect via Tortoise capabilities, close remote
download sessions on client abort, and disable invalid CORS credentials.
2026-07-23 19:38:50 +08:00
Lan ee8f9082ab feat: automate version releases 2026-07-11 21:49:04 +08:00
Lan 818dd47b2a feat: add global storage capacity limit 2026-07-11 17:50:26 +08:00
Lan 8d7d856c62 fix: harden share retrieval and admin visibility (#482, #480) 2026-07-10 17:39:53 +08:00
Lan cdaf3638b8 feat: add first-run setup security flow 2026-06-16 00:49:43 +08:00
Lan 1d03337e2f fix: #476 serve assets from selected theme 2026-06-05 11:37:44 +08:00
Lan aa6904a12c fix: #465 restrict uploads by allowed file types 2026-06-05 11:29:37 +08:00
Lan 530f52aa1e refactor: centralize app version 2026-06-03 12:22:12 +08:00
Lan 6fe68be2dd fix: support legacy presign proxy upload URLs 2026-06-03 02:57:29 +08:00
Lan a0c453b014 feat: add public config and health endpoints 2026-06-03 02:15:15 +08:00
Lan e7b5792602 feat: add configuration management with async settings refresh and middleware integration 2026-02-13 23:45:44 +08:00
Lan 843a237fad fix: implement async database startup lock and refactor db configuration 2026-02-13 23:30:48 +08:00
Lan 3074d9ba2e feat: https://github.com/vastsa/FileCodeBox/issues/442 密码进行hash存储 2026-01-07 20:36:59 +08:00
Lan 8e57a497f7 feat: 支持S3预签名上传 2025-12-31 03:25:09 +08:00
Lan f1a16a115a revert: 重新使用0.0.0.0 后续新增后台配置,延长后台时间 2025-12-19 10:17:37 +08:00
Lan 900541baa5 feat(config): Add configurable workers and host settings
- Add "workers" configuration option to DEFAULT_CONFIG with default value of 1
- Add "host" configuration option to DEFAULT_CONFIG with default value of "::"
- Update uvicorn.run() to use settings.host and settings.workers instead of hardcoded values
- Reorganize imports in main.py for better readability and consistency
- Add blank line after time import in core/utils.py for PEP 8 compliance
- Allow dynamic configuration of server workers and binding host address
2025-12-18 23:08:40 +08:00
Lan c1966b3942 feat: s3适配切片上传 2025-12-01 15:13:33 +08:00
Lan 168ca8383f feat: 优化上传时间检查 2025-03-02 15:26:41 +08:00
Lan fdada809d9 wip: 切片上传、文件秒传、断点续传陆续适配中当前进度(本地存储已适配) 2025-02-23 20:49:51 +08:00
Lan 731b6319d0 feat: new adaptation root path configuration 2025-02-16 22:25:14 +08:00
Lan 7ea1fe2e90 feat:New database migration, new adaptation root path configuration 2025-02-16 21:38:44 +08:00
Lan 1ff1d6c695 style: code format 2025-02-15 22:00:53 +08:00
Lan 964d091d0b feat: 新增存储路径自定义,修复s3存储未删除文件#246 2025-02-08 22:41:32 +08:00
Lan 63b5be31e8 fix:some bug 2024-12-20 19:46:24 +08:00
Lan 651e9c5936 feat: 新增主题选择 2024-11-28 20:13:02 +08:00
Lan f0e7304bb2 feat:新增后台dashboard接口 2024-11-23 16:43:58 +08:00
Lan cc3a521d31 refact: some codes 2024-10-06 17:14:16 +08:00
Lan fd1eea7779 update: deprecated on_event 2024-10-06 16:43:49 +08:00
Lan dcd30caf26 update:update requirements.txt 2024-10-06 16:30:37 +08:00
lan fafc56bc32 fix: issue #186 2024-07-28 19:03:37 +08:00
lan 3edc8c959d feat: 新增后台控制前台是否显示admin、新增robots.txt 2024-07-07 15:54:01 +08:00
lan 40e2335976 feat:新增网站通知,右上角显示,只显示一次同一个内容 2024-06-15 21:00:50 +08:00
lan c13602d634 feat:新增网站通知,右上角显示,只显示一次同一个内容 2024-06-15 20:52:01 +08:00
lan f9cd9c95c3 feat:前端判断是否开启游客上传 2024-06-15 20:28:12 +08:00
lan 43f0f730d3 warning:更新需备份配置,已放弃env文件存储配置,会丢失旧配置 2024-06-15 20:08:20 +08:00
lan a891fbe826 feat: 新增后台选择过期方式 2024-06-15 20:04:48 +08:00
lan c6fe556e76 feat: 上传前判断大小、新文件插入第一位 2024-06-15 17:27:28 +08:00
lan 8215ef9e4b fix: 修复文本取件问题 2024-05-06 13:02:00 +08:00
buyfakett 3563b86b82 后端移动文件夹,前端在docker中编译,进一步减小镜像大小 2024-05-02 00:29:33 +08:00
lan 7998607ac4 fix: 基础目录设置 2024-01-18 20:24:01 +08:00
lan c6d538b2f4 fix: 基础目录设置 2024-01-18 19:00:30 +08:00