60 Commits

Author SHA1 Message Date
jxxghp
16cd9f75ed fix(apppush): deliver business notifications to all active users (#7235) 2026-10-29 21:43:18 +08:00
Cat
87561a90d1 fix(agent): route agent command receipts to the signed channel user (#7228)
- Agent 代渠道用户调用内部 API 时,把会话渠道与渠道用户写入宿主签发令牌的签名
  声明(agent_channel、agent_channel_user),不再新增可伪造的请求头。
- /commands/run 对 Telegram 等通知渠道只使用与请求渠道一致的签名渠道用户执行命令
  和投递回执;缺少该声明时明确拒绝,不再把 MoviePilot 用户表主键当作渠道 chat id。
  Web、WebAgent 与无渠道调用仍按 MoviePilot 用户 ID 处理。
- 只读公共资料借用宿主身份,不携带渠道发起人声明。
- 同步依赖基线与架构总览中的内部导入边数量。

Refs #7225

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: jxxghp <jxxghp@gmail.com>
2026-10-28 19:05:52 +08:00
jxxghp
d66b58c475 feat(widget): enrich system and combined media summaries 2026-10-25 14:53:54 +08:00
jxxghp
86ededa739 feat(widget): 增加当前主登录的只读账号上下文 (#7176) 2026-10-25 06:28:57 +08:00
jxxghp
721c03734a feat(widget): 提供受限凭据和只读快照接口 (#7175)
* feat(widget): add restricted read-only snapshot foundation

* test(widget): 补齐运行时与文档迁移契约
2026-10-25 06:02:47 +08:00
jxxghp
6680e090e6 feat: 自动登记中心推送实例并安全轮换凭据 2026-10-24 09:17:24 +08:00
jxxghp
3ac7526930 feat(notification): relay AppPush through private MoviePilot Server 2026-10-24 07:32:00 +08:00
Aqr-K
5aebc7ac59 fix(auth): preserve administrator and credential consistency (#7141) 2026-10-23 06:50:30 +08:00
jxxghp
6d4ce83837 fix(types): clear host mypy debt and prevent typing regressions
严格检查全部宿主源码,清零类型错误预算并移除按模块类型豁免。
按原因、所属方法、错误码及语法指纹锁定必要兼容例外和站点类型桩,
CI 阻断新增忽略、检查范围退化、本地桩替代真实接口及新的类型错误。

修复空值、异步和供应方类型边界,保持插件与 API 兼容合同,
并补充存储、订阅、通知、Agent 和工作流边界的回归覆盖。
2026-10-21 22:03:18 +08:00
DDSRem
e0642eafa7 chore(types): reduce v3 host mypy debt (#7057)
* chore(types): clear AniList endpoint mypy debt

* chore(types): clear Douban endpoint mypy debt

* chore(types): clear recommendation endpoint mypy debt

* chore(types): clear subscription notification mypy debt

* chore(types): clear SDK string compatibility mypy debt

* chore(types): ratchet v3 host mypy across remaining files

* chore(types): reduce v3 host mypy debt and retire ledger

* chore(types): reconcile host snapshot with upstream HTTP pool

* test(types): cover host paths exposed by mypy cleanup
2026-10-18 09:37:49 +08:00
DDSRem
2de976f6b3 Merge pull request #7050 from DDSRem-Dev/codex-comment-migration
docs: 统一全项目中文注释和结构化契约说明
2026-10-17 19:26:29 +08:00
jxxghp
c84ae5c9b8 refactor(types): declare authentication ticket store initialization 2026-10-17 03:41:15 +08:00
jxxghp
f256e5e31d fix(crypto): pad AES plaintext by UTF-8 byte length 2026-10-16 17:54:28 +08:00
jxxghp
ad9f3f0d1e refactor(types): declare verified pyotp return contracts 2026-10-16 17:43:34 +08:00
jxxghp
b2cbb0b6bf fix(auth): preserve leading zeros in generated TOTP codes 2026-10-16 17:42:28 +08:00
jxxghp
4955b7b9ea fix: harden backend isolation and execution safety 2026-10-16 09:11:28 +08:00
jxxghp
bd1e6eb899 fix(agent): separate public API queries from bound user operations 2026-10-12 07:30:35 +08:00
InfinityPacer
25aaf3a32b feat(plugin): add agent pet extension contract
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 04:08:15 +08:00
freeman
2165475dd0 fix(security): throttle password login after repeated failures
The access-token endpoint accepted unlimited password attempts; the
only existing rate limiters are single-instance helpers for outbound
site requests. Add app/application/security/throttle.py, an in-memory
LoginThrottle keyed by (client address, normalized username) that locks
for 30s after five consecutive failures and doubles the lockout up to
15 minutes. The endpoint answers 429 with Retry-After while locked,
counts only real credential failures (an MFA challenge after a correct
password does not count), and clears the record on success.

X-Forwarded-For is deliberately not trusted because there is no
trusted-proxy setting; behind the bundled nginx all requests share one
address, so the key degrades to per-username throttling, which is the
dimension brute-force protection needs. Sync the dependency snapshot
and architecture metrics for the new module.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 12:01:04 +08:00
jxxghp
e51fd44964 fix(agent): resolve alternative QQ and Feishu user bindings
Keep strict binding lookup as the default and explicitly match alternative channel identifiers for the Agent API gateway. Reject ambiguous active-user matches and cover single-field bindings with database-backed tests.

Refs #6905
2026-10-07 09:16:33 +08:00
jxxghp
b4175a4f88 fix(image): cache site allowlist and include custom image hosts 2026-09-30 01:09:32 +08:00
InfinityPacer
313f894052 perf(memory): import storage and passkey SDKs on demand
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 03:46:22 +08:00
jxxghp
bbaec9d6b3 fix: preserve v3 architecture complexity budget 2026-09-23 18:49:00 +08:00
LS
c68288e897 feat(security): 图片代理自动信任已启用的媒体服务器主机 (#6769)
在局域网部署 Emby/Jellyfin/Plex 的用户,此前需要手动维护
SECURITY_IMAGE_DOMAINS(整表覆盖,会随版本默认值漂移)和
IMAGE_PROXY_ALLOWED_PRIVATE_RANGES,未签名的媒体服务器图片 URL
才能通过图片代理。

- is_safe_image_url_async 新增可选参数 trusted_hosts:URL 的 netloc
  (含端口)或 hostname 精确命中时直接放行,不受私网拦截限制;
  默认 None,现有调用方行为不变。
- fetch_image(覆盖 /img 与 /cache/image)从已启用媒体服务器的
  host / play_host 计算受信主机;读取配置失败时返回空集合,不影响代理。

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-23 16:34:25 +08:00
jxxghp
8072b7d78f Refactor application architecture and compatibility boundaries 2026-09-13 12:53:00 +08:00
jxxghp
ed6439bf2e fix(architecture): close mypy ratchet regressions 2026-09-11 15:24:46 +08:00
jxxghp
a3b78fe8c8 refactor(cookie): keep login helper complexity within budget 2026-09-11 15:00:24 +08:00
jxxghp
06ed22c584 feat(agent): improve browser-assisted site cookie login 2026-09-11 14:31:01 +08:00
jxxghp
82652add91 fix(auth): fix passkey deletion password verification 2026-09-06 10:05:40 +08:00
jxxghp
478e7ee0a4 fix(auth): restore API token compatibility 2026-09-02 20:22:57 +08:00
jxxghp
d512f528be refactor(api): make collection pagination explicit 2026-09-01 09:13:56 +08:00
jxxghp
fdba2c7d64 refactor(agent): unify tools behind API gateway and provider skills 2026-08-31 16:57:54 +08:00
InfinityPacer
5c70757a81 fix(auth): align v3 authentication contracts
按已确认的 V3 AUTH-001 交付门禁合并:后端认证与用户资料契约已完成本地前后端联调,Architecture、Coverage、单测分片和 Pylint 全部通过。
2026-08-31 04:57:34 +08:00
jxxghp
9146c75941 feat(auth): add first-run administrator initialization 2026-08-30 09:05:23 +08:00
jxxghp
5202c04dee refactor(application): unify sync async decisions 2026-08-29 19:54:08 +08:00
jxxghp
808f2439ef refactor(startup): add provider reset contracts 2026-08-29 17:57:01 +08:00
jxxghp
d2a860d89a refactor(startup): govern composition lifecycle ownership 2026-08-29 16:57:53 +08:00
jxxghp
2fe39d856c refactor(architecture): invert application adapter boundaries 2026-08-28 18:45:47 +08:00
jxxghp
9bff18739d refactor(runtime): own lifecycle and adapter boundaries 2026-08-28 18:18:07 +08:00
jxxghp
aa8751f775 refactor: close transactional boundary debt batch 2026-08-28 10:36:12 +08:00
jxxghp
3f8d5990e7 refactor(user): freeze host user query ports 2026-08-28 08:44:35 +08:00
jxxghp
ea58c245dd fix: restore quality gates after module renames 2026-08-27 21:05:36 +08:00
jxxghp
f888aab2c9 refactor: 统一插件迁移与 Passkey 模块命名 2026-08-27 20:38:55 +08:00
jxxghp
49ea278436 fix(site): satisfy login fallback type ratchet 2026-08-27 14:10:46 +08:00
jxxghp
ff355cbe5d fix(site): follow tracker login page for cookie refresh (#6473) 2026-08-27 13:52:37 +08:00
jxxghp
e768eb46fe refactor: own coalescer flush lifecycle 2026-08-24 03:11:49 +08:00
InfinityPacer
3d7fb44dc7 refactor(database): isolate configuration transactions 2026-08-23 02:29:22 +08:00
jxxghp
7846b24f6c refactor: inject URL signing runtime configuration 2026-08-23 01:26:09 +08:00
jxxghp
690ebe0c02 refactor: inject token runtime configuration 2026-08-23 01:14:12 +08:00
jxxghp
56cb7294eb refactor: extract cache network and compatibility entrypoints 2026-08-22 23:13:59 +08:00