GareArc
d2e1177478
fix: use UnauthorizedAndForceLogout to trigger frontend logout on license expiry
...
Change license check to raise UnauthorizedAndForceLogout exception instead
of returning generic JSON response. This ensures proper frontend handling:
Frontend behavior (service/base.ts line 588):
- Checks if code === 'unauthorized_and_force_logout'
- Executes globalThis.location.reload()
- Forces user logout and redirect to login page
- Login page displays license expiration UI (already exists)
Response format:
- HTTP 401 (not 403)
- code: "unauthorized_and_force_logout"
- Triggers frontend reload which clears auth state
This completes the license enforcement flow:
1. Backend blocks all business APIs when license expires
2. Backend returns proper error code to trigger logout
3. Frontend reloads and redirects to login
4. Login page shows license expiration message
2026-03-04 20:40:29 -08:00
GareArc
8a21fd88fd
feat: add global license check middleware to block API access on expiry
...
Add before_request middleware that validates enterprise license status
for all /console/api endpoints when ENTERPRISE_ENABLED is true.
Behavior:
- Checks license status before each console API request
- Returns 403 with clear error message when license is expired/inactive/lost
- Exempts auth endpoints (login, oauth, forgot-password, etc.)
- Exempts /console/api/features so frontend can fetch license status
- Gracefully handles errors to avoid service disruption
This ensures all business APIs are blocked when license expires,
addressing the issue where APIs remained callable after expiry.
2026-03-04 20:40:29 -08:00
GareArc
1c1bcc67da
fix: handle enterprise API errors properly to prevent KeyError crashes
...
When enterprise API returns 403/404, the response contains error JSON
instead of expected data structure. Code was accessing fields directly
causing KeyError → 500 Internal Server Error.
Changes:
- Add enterprise-specific error classes (EnterpriseAPIError, etc.)
- Implement centralized error validation in EnterpriseRequest.send_request()
- Extract error messages from API responses (message/error/detail fields)
- Raise domain-specific errors based on HTTP status codes
- Preserve backward compatibility with raise_for_status parameter
This prevents KeyError crashes and returns proper HTTP error codes
(403/404) instead of 500 errors.
2026-03-04 19:55:03 -08:00
2b5ce196ad
test: migrate test_document_service_rename_document SQL tests to testcontainers ( #32542 )
...
Co-authored-by: KinomotoMio <[email protected] >
2026-03-05 10:07:29 +09:00
a0331b8b45
chore(deps): bump authlib from 1.6.6 to 1.6.7 in /api ( #32998 )
...
Signed-off-by: dependabot[bot] <[email protected] >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 09:50:12 +09:00
914bd4d00d
chore(deps): bump fickling from 0.1.8 to 0.1.9 in /api ( #32999 )
...
Signed-off-by: dependabot[bot] <[email protected] >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 09:49:43 +09:00
df3c66a8ac
test: migrate duplicate_document_indexing_task SQL tests to testcontainers ( #32540 )
...
Co-authored-by: KinomotoMio <[email protected] >
2026-03-05 02:35:24 +09:00
wangxiaolei and GitHub
882b4c9ef6
refactor: document extract node decouple ssrf_proxy ( #32949 )
2026-03-04 16:01:43 +08:00
L1nSn0w and GitHub
3aed24c507
fix(api): decouple enterprise default-workspace join from personal workspace creation ( #32938 )
2026-03-04 14:16:23 +08:00
e1e1f81bde
perf(api): utilize the message_workflow_run_id_idx while querying messages ( #32944 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-04 14:11:14 +08:00
Renzo and GitHub
ad000c42b7
feat: replace db.session with db_session_with_containers ( #32942 )
2026-03-04 14:50:41 +09:00
wangxiaolei and GitHub
2f4c740d46
feat: support redis xstream ( #32586 )
2026-03-04 13:18:55 +08:00
wangxiaolei and GitHub
e14b09d4db
refactor: human input node decouple db ( #32900 )
2026-03-04 13:18:32 +08:00
b584434e28
feat: redis connection support max connections ( #32935 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-04 11:52:43 +08:00
6002fd09b4
test: migrate test_dataset_service_create_dataset SQL tests to testcontainers ( #32538 )
...
Co-authored-by: KinomotoMio <[email protected] >
2026-03-04 03:40:18 +09:00
2b47db0462
fix(api): resolve OpenTelemetry histogram type mismatch ( #32771 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-04 00:01:16 +09:00
65bf632ec0
test: migrate test_dataset_service_batch_update_document_status SQL tests to testcontainers ( #32537 )
...
Co-authored-by: KinomotoMio <[email protected] >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-03 20:29:58 +09:00
FFXN and GitHub
2068640a4b
fix: Add the missing validation of doc_form in the service API. ( #32892 )
2026-03-03 15:54:43 +08:00
99 and GitHub
c8688ec371
refactor(dify_graph): unify invoke and user enums source in workflow ( #32873 )
2026-03-03 15:05:20 +08:00
56f460e290
chore(deps): bump pypdf from 6.7.4 to 6.7.5 in /api ( #32882 )
...
Signed-off-by: dependabot[bot] <[email protected] >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 14:42:05 +09:00
wangxiaolei and GitHub
1b2234a19f
refactor: TemplateTransformNode decouple code executor ( #32879 )
2026-03-03 13:36:17 +08:00
-LAN- and GitHub
4fd6b52808
refactor(api): move model_runtime into dify_graph ( #32858 )
2026-03-02 20:15:32 +08:00
e985e73bdc
perf: optimize dataset api query speed ( #32847 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 18:49:21 +08:00
-LAN- and GitHub
c917838f9c
refactor: move workflow package to dify_graph ( #32844 )
2026-03-02 18:42:30 +08:00
wangxiaolei and GitHub
707bf20c29
refactor: knowledge index node decouples business logic ( #32274 )
2026-03-02 17:54:33 +08:00
Br1an and GitHub
68647391e7
fix(api): add return type annotation to filter_none_values() ( #32774 )
2026-03-02 17:51:21 +09:00
wangxiaolei and GitHub
5c7a293ba7
feat: ensure document id is not missing ( #32765 )
2026-03-02 16:28:31 +08:00
Xiyuan Chen and GitHub
8a7ba87349
fix: upgrade OpenTelemetry to 0.49b0 to fix context detach error ( #32825 )
2026-03-02 16:03:37 +09:00
9ddbc1c0fb
fix: map all NodeType values to span kinds in Arize Phoenix tracing ( #32059 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Crazywoola <[email protected] >
2026-03-02 14:54:26 +08:00
42a8d962a0
refactor: remove tests and core/rag from pyrefly excludes ( #32801 )
...
Co-authored-by: Stable Genius <[email protected] >
2026-03-02 15:31:29 +09:00
cc127f5b62
fix: fix chat assistant response mode blocking is not work ( #32394 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 14:05:04 +08:00
aca3d1900e
chore(deps-dev): update types-aiofiles requirement from ~=24.1.0 to ~=25.1.0 in /api ( #32803 )
...
Signed-off-by: dependabot[bot] <[email protected] >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 13:59:53 +09:00
ddc47c2f39
chore(deps): update pyjwt requirement from ~=2.10.1 to ~=2.11.0 in /api ( #32804 )
...
Signed-off-by: dependabot[bot] <[email protected] >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 13:59:06 +09:00
hj24 and GitHub
8cc775d9f2
fix: optimize workflow_run iter query ( #32815 )
2026-03-02 11:01:11 +08:00
00dbaef04f
fix: use declared_attr.directive for WorkflowNodeExecutionModel.__table_args__ ( #32656 )
...
Signed-off-by: edvatar <[email protected] >
Co-authored-by: Asuka Minato <[email protected] >
2026-03-02 10:15:06 +08:00
248202c220
fix: remove references to non-existent Document attributes in test ( #32654 )
...
Signed-off-by: edvatar <[email protected] >
Co-authored-by: Asuka Minato <[email protected] >
2026-03-02 10:14:56 +08:00
HanWenbo and GitHub
691c9911c7
fix(ci): make pyrefly diff comments focus on diagnostics ( #32778 )
2026-03-02 10:11:23 +08:00
baeea77c5b
fix: typo in WebScraper plugin description: "Scrapper" → "Scraper" ( #32790 )
...
Co-authored-by: copilot-swe-agent[bot] <[email protected] >
Co-authored-by: crazywoola <[email protected] >
2026-03-02 10:10:28 +08:00
wangxiaolei and GitHub
9da98e6c6c
fix: fix import error ( #32800 )
2026-03-02 08:59:53 +08:00
99 and GitHub
a01de98721
refactor(workflow): decouple start node external dependencies ( #32793 )
2026-03-02 02:01:41 +08:00
17c1538e03
refactor(workflow): move PromptMessageMemory to model_runtime.memory ( #32796 )
...
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 01:58:02 +08:00
-LAN- and GitHub
69b3e94630
refactor: inject workflow node memory via protocol ( #32784 )
2026-03-02 01:55:49 +08:00
-LAN- and GitHub
ef2b5d6107
refactor(api): move llm quota deduction to app graph layer ( #32786 )
2026-03-01 23:25:36 +08:00
-LAN- and GitHub
ffe77fecdf
revert(graph-engine): rollback stop-event unification ( #32789 )
2026-03-01 19:43:05 +08:00
weiguang li and GitHub
b462a96fa0
fix: serialize data_source_info with json.dumps in Notion sync task ( #32747 )
2026-03-01 19:37:51 +08:00
盐粒 Yanli and GitHub
bc6fd0b5dd
chore: remove ty from backend type-check pipeline ( #32782 )
2026-03-01 19:10:24 +08:00
-LAN- and GitHub
53c62fde33
fix(api): enforce ownership check for conversation delete ( #32686 )
2026-03-01 17:53:37 +08:00
f0f01c69aa
fix: add missing pipeline_templates ( #31528 )
...
Co-authored-by: FFXN <[email protected] >
2026-03-01 17:33:04 +08:00
337161cdb9
feat(enterprise): auto-join newly registered accounts to the default workspace ( #32308 )
...
Co-authored-by: Yunlu Wen <[email protected] >
2026-03-01 16:53:09 +08:00
00e52796e6
refactor(workflow): remove code node helper imports ( #32759 )
...
Co-authored-by: -LAN- <[email protected] >
2026-03-01 16:31:45 +08:00