29 Commits
Author SHA1 Message Date
vastsa eb2db8f507 fix: don't let a legacy background value block settings saves
#514 began validating `background` as an http(s) URL against the *merged*
config, so a value stored by an older release (a relative path, or one
containing a space/parenthesis — all legal before) made every subsequent
settings save return 400, including saves that never touched `background`.
Existing deployments could not change any setting at all.

Validate only values that actually change: an untouched legacy value is
kept as-is (it is still html-escaped on render), while any edit must pass
validation. Regression tests cover both directions and fail without this
change.

Also treat OverflowError from hashlib.scrypt as a non-matching hash so a
hand-crafted n/r/p cannot disturb the login path on runtimes that raise it.
2026-09-14 21:52:23 +08:00
Marrrrrrrrry 443cfe7472 feat: upgrade password hashing to memory-hard scrypt with transparent rehash
- new hashes use scrypt (n=2^14, r=8, p=1); sha256 and plaintext formats
  keep verifying unchanged, so existing deployments are unaffected
- on successful login a legacy-stored admin password is rehashed to scrypt
  in the settings KeyValue row
- add password_needs_rehash() and extend scheme detection; stdlib only, no
  new dependency
2026-09-09 16:33:07 +08:00
Marrrrrrrrry 4cab625d5a fix: validate background config as http(s) URL to close CSS quote-breakout in 2023 theme 2026-09-09 16:21:35 +08:00
Lan ae7702603a Merge pull request #496 from vastsa/fix/pr494-security-patches
fix: harden share expiry, download token, quota SQL, and CORS
2026-07-23 19:41:40 +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
vastsa 00f3abd3b2 fix: patch CVE dependencies and path traversal risks
Upgrade aiohttp and related packages, harden local file and storage path checks, tighten password/JWT comparisons, and default Docker forwarded IP trust to empty.
2026-07-21 14:49:30 +08:00
Lan cdaf3638b8 feat: add first-run setup security flow 2026-06-16 00:49:43 +08:00
Lan 1b6d8e7277 fix: harden share rate limit and code generation (#479) 2026-06-09 00:53:11 +08:00
Lan 3074d9ba2e feat: https://github.com/vastsa/FileCodeBox/issues/442 密码进行hash存储 2026-01-07 20:36:59 +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 bd6f646f5d fix: some error 2025-12-01 11:30:52 +08:00
Lan eeb70c7f44 fix: #349 2025-05-21 00:14:40 +08:00
Lan 1ff1d6c695 style: code format 2025-02-15 22:00:53 +08:00
Lan 037949b715 feat: 新增webdav存储 2025-02-09 20:25:23 +08:00
Lan cc3a521d31 refact: some codes 2024-10-06 17:14:16 +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 62025e3d6c add:1panel install 2023-12-13 22:50:16 +08:00
Do1e 3b84035715 add: #103, add max_save_seconds config 2023-11-28 10:27:34 +08:00
lan 4e79991f82 add:vue-i18n,admin add file size 2023-09-06 11:06:18 +08:00
silver-ymz a198886d11 feat: support server transfer for opendal
Signed-off-by: silver-ymz <yinmingzhuo@gmail.com>
2023-08-24 14:04:00 +08:00
lan 1d9642cf3e add:fronted 2023-08-14 13:30:10 +08:00
lan 2baaa0459d add:fronted 2023-08-14 05:03:07 +08:00
lan accd384e4b add:fronted 2023-08-14 01:56:46 +08:00
lan a39cdadc96 update 2023-08-11 19:23:48 +08:00
lan 2eafca2f0c update:优化分析模式 2023-03-01 01:09:47 +08:00
lan ba71942caa add:解决select可跳过次数限制,新增sha256加密token,限制取件码+ip+时间999s内取件 2023-02-09 14:22:56 +08:00
lan 1f303d3340 add:解决select可跳过次数限制,新增sha256加密token,限制取件码+ip+时间999s内取件 2023-02-08 03:17:22 +08:00
lan ee5beb2261 重构中,配置存入数据库,第一次智能生成随机后台地址,登录密码 2023-01-16 16:03:25 +08:00