Commit Graph

16473 Commits

Author SHA1 Message Date
Classic298
cfd2888545 fix:image url validation and signout post (#24420)
* refac(routers): reject external URLs in profile/model image handlers

* refac(ui): centralize image URL validation in safeImageUrl helper

* refac(auths): make signout POST-only

* refac: gate external profile image redirect behind ENABLE_PROFILE_IMAGE_URL_FORWARDING

Restore the 302 redirect for external http(s) profile image URLs in
the user and model profile-image endpoints, but gate it behind a new
ENABLE_PROFILE_IMAGE_URL_FORWARDING env flag (default: True).

Existing deployments that rely on external profile image forwarding
continue to work unchanged.  Operators who want to suppress the
redirect (to prevent client-side IP/UA/Referer leaks) can set the
flag to False.
2026-05-09 07:33:31 +09:00
looselyhuman
adda20509c fix(mcp): remove asyncio.wait_for/shield from MCP cleanup in chat handler (#24105)
asyncio.wait_for() and asyncio.shield() create new asyncio Tasks which
violate anyio cancel-scope task-ownership rules. The MCPClient's
exit_stack contains anyio resources (streamable_http transport) that
use anyio cancel scopes. When exited from a different task, anyio raises
'Attempted to exit a cancel scope that isn't the current task's current
cancel scope' as a BaseException.

This BaseException propagates through the finally block, discards the
completed response return value, and surfaces as a 500 Internal Server
Error / 'No response returned.' - silently swallowing successful MCP
tool calls and blocking the chat endpoint.

Fix: call client.disconnect() directly in a simple loop. MCPClient.disconnect()
already catches BaseException internally (see prior commit), so no
wrapper is needed.

Signed-off-by: Adam Tao <tcx4c70@gmail.com>
Co-authored-by: Tim Baek <tim@openwebui.com>
Co-authored-by: joaoback <156559121+joaoback@users.noreply.github.com>
Co-authored-by: Algorithm5838 <108630393+Algorithm5838@users.noreply.github.com>
Co-authored-by: Kylapaallikko <Kylapaallikko@users.noreply.github.com>
Co-authored-by: Teay <pythontogoplease@gmail.com>
Co-authored-by: tcx4c70 <tcx4c70@gmail.com>
Co-authored-by: goodbey857 <76645482+goodbey857@users.noreply.github.com>
Co-authored-by: Jacob Leksan <63938553+jmleksan@users.noreply.github.com>
Co-authored-by: RomualdYT <romuald@gameurnews.fr>
Co-authored-by: Lucas <lucas@vanosenbruggen.com>
Co-authored-by: Classic298 <27028174+Classic298@users.noreply.github.com>
Co-authored-by: Constantine <Runixer@gmail.com>
Co-authored-by: Circe (Claude Code Sonnet 4.6) <circe@athena-council.org>
Co-authored-by: Claude <noreply@anthropic.com>
2026-05-09 07:15:24 +09:00
Timothy Jaeryang Baek
e1dce99147 refac 2026-05-09 07:13:36 +09:00
Timothy Jaeryang Baek
a938c8ae2e refac 2026-05-09 07:11:17 +09:00
Timothy Jaeryang Baek
5b80932e59 refac 2026-05-09 06:56:22 +09:00
Timothy Jaeryang Baek
2ba6b423aa refac 2026-05-09 06:50:11 +09:00
Timothy Jaeryang Baek
02f9fe7890 refac 2026-05-09 06:49:41 +09:00
Timothy Jaeryang Baek
29f6c72e87 refac 2026-05-09 06:44:42 +09:00
Timothy Jaeryang Baek
bb0e6cb108 refac 2026-05-09 06:41:42 +09:00
Timothy Jaeryang Baek
6700f7bb72 feat: brave search llm context 2026-05-09 06:34:25 +09:00
Timothy Jaeryang Baek
1baf73bdd5 refac 2026-05-09 06:34:03 +09:00
Timothy Jaeryang Baek
1d892ce2c5 refac 2026-05-09 06:33:26 +09:00
Timothy Jaeryang Baek
794b97025d refac 2026-05-09 06:32:34 +09:00
Timothy Jaeryang Baek
ee3b82926b refac 2026-05-09 06:25:38 +09:00
Timothy Jaeryang Baek
38a382ef88 refac 2026-05-09 06:23:51 +09:00
Timothy Jaeryang Baek
34146ab60f refac 2026-05-09 06:20:27 +09:00
Timothy Jaeryang Baek
f70b0da156 refac 2026-05-09 06:16:27 +09:00
Timothy Jaeryang Baek
af5628f8ef refac 2026-05-09 06:13:58 +09:00
Timothy Jaeryang Baek
9907c0a25a refac 2026-05-09 06:01:02 +09:00
Cyp
d78c247036 Korean Translation Update (#24087)
Signed-off-by: Adam Tao <tcx4c70@gmail.com>
Co-authored-by: Tim Baek <tim@openwebui.com>
Co-authored-by: joaoback <156559121+joaoback@users.noreply.github.com>
Co-authored-by: Algorithm5838 <108630393+Algorithm5838@users.noreply.github.com>
Co-authored-by: Kylapaallikko <Kylapaallikko@users.noreply.github.com>
Co-authored-by: Teay <pythontogoplease@gmail.com>
Co-authored-by: tcx4c70 <tcx4c70@gmail.com>
Co-authored-by: goodbey857 <76645482+goodbey857@users.noreply.github.com>
Co-authored-by: Jacob Leksan <63938553+jmleksan@users.noreply.github.com>
Co-authored-by: RomualdYT <romuald@gameurnews.fr>
Co-authored-by: Lucas <lucas@vanosenbruggen.com>
Co-authored-by: Classic298 <27028174+Classic298@users.noreply.github.com>
Co-authored-by: Constantine <Runixer@gmail.com>
2026-05-09 05:31:49 +09:00
Shamil
ae0827cec0 style(env): satisfy ruff (datetime alias, line length, identity check) (#24118) 2026-05-09 05:30:09 +09:00
Timothy Jaeryang Baek
064fdecb67 refac 2026-05-09 05:29:15 +09:00
Timothy Jaeryang Baek
bf4f44ee9c refac 2026-05-09 05:27:47 +09:00
Timothy Jaeryang Baek
212bb68a66 refac 2026-05-09 05:27:32 +09:00
Vincent Agra
aff78e4958 i18n: Add Tagalog (Filipino) translation (#24254)
Signed-off-by: Adam Tao <tcx4c70@gmail.com>
Co-authored-by: Tim Baek <tim@openwebui.com>
Co-authored-by: joaoback <156559121+joaoback@users.noreply.github.com>
Co-authored-by: Algorithm5838 <108630393+Algorithm5838@users.noreply.github.com>
Co-authored-by: Kylapaallikko <Kylapaallikko@users.noreply.github.com>
Co-authored-by: Teay <pythontogoplease@gmail.com>
Co-authored-by: tcx4c70 <tcx4c70@gmail.com>
Co-authored-by: goodbey857 <76645482+goodbey857@users.noreply.github.com>
Co-authored-by: Jacob Leksan <63938553+jmleksan@users.noreply.github.com>
Co-authored-by: RomualdYT <romuald@gameurnews.fr>
Co-authored-by: Lucas <lucas@vanosenbruggen.com>
Co-authored-by: Classic298 <27028174+Classic298@users.noreply.github.com>
Co-authored-by: Constantine <Runixer@gmail.com>
2026-05-09 05:25:44 +09:00
Timothy Jaeryang Baek
ae43562b86 refac 2026-05-09 05:24:50 +09:00
Timothy Jaeryang Baek
13693554f1 refac 2026-05-09 05:20:28 +09:00
Classic298
1a3e5ef4c1 perf(prompts): make /tags fetch only the tags column with SQL access filter (#24287)
Non-admin GET /api/v1/prompts/tags went through get_prompts_by_user_id,
which loaded every active prompt with its full content/data/meta plus
owner records and all access grants, then ran one has_access query per
prompt that wasn't owned by the caller - all so the endpoint could
collapse the result to a sorted tag list. With 600 prompts this took
several seconds while the admin path (a single SELECT) returned in <1s.

Add Prompts.get_tags_by_user_id which selects only the tags column and
applies the same EXISTS-based access filter used by /list. Also tighten
the admin get_tags to project just the tags column instead of full rows.
The endpoint is now one DB query (plus one for groups), no row hydration,
no N+1.

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-09 05:20:13 +09:00
Aleix Dorca
26b1a3d7dc Update catalan translation.json (#24174) 2026-05-09 05:17:48 +09:00
Timothy Jaeryang Baek
3ab7b777b1 refac 2026-05-09 05:15:12 +09:00
Timothy Jaeryang Baek
1789303886 refac 2026-05-09 05:14:55 +09:00
Classic298
41107a34ca perf(prompts): filter prompt list in SQL instead of N+1 has_access loop (#24288)
get_prompts_by_user_id used to fetch every active prompt (with users +
all access grants), then call AccessGrants.has_access() once per prompt
that the user did not own. With 600+ prompts this issued ~600 extra
round-trips per request and explained the multi-second delay reported in
the GET /api/v1/prompts and /api/v1/prompts/tags endpoints for non-admin
users.

Push the access check into a single SQL query via the existing
AccessGrants.has_permission_filter (EXISTS subquery), so only accessible
rows come back from the DB. Users and access grants for the surviving
rows are still batch-fetched, no N+1 anywhere on this path.

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-09 05:12:51 +09:00
Shirasawa
114c99ae2f I18n/improve chinese translation (#24194)
* i18n: improve zh-CN translation

* i18n: improve zh-TW translation
2026-05-09 05:11:48 +09:00
Classic298
3746339cfc refac: apply DOMPurify to excel and office HTML render assignments (#24468) 2026-05-09 05:10:31 +09:00
Timothy Jaeryang Baek
7eeff2fdf9 refac 2026-05-09 05:09:20 +09:00
Timothy Jaeryang Baek
55e7c7854b refac 2026-05-09 05:04:51 +09:00
Timothy Jaeryang Baek
c978a788c8 refac 2026-05-09 05:03:38 +09:00
Timothy Jaeryang Baek
3d48596c9e refac 2026-05-09 04:56:25 +09:00
Timothy Jaeryang Baek
072d2000f3 refac 2026-05-09 04:53:47 +09:00
Timothy Jaeryang Baek
9386fc83a3 refac 2026-05-09 04:49:18 +09:00
Jacob Leksan
b63da90ae4 Enhance CommitSessionMiddleware to allow health probes to bypass session management, ensuring faster and more reliable responses. (#24384) 2026-05-09 04:46:00 +09:00
Timothy Jaeryang Baek
23ff9943a9 refac 2026-05-09 04:44:20 +09:00
Timothy Jaeryang Baek
33e588cf09 refac 2026-05-09 04:39:44 +09:00
Timothy Jaeryang Baek
005df577fe refac 2026-05-09 04:36:43 +09:00
Timothy Jaeryang Baek
1b4cd705d0 refac 2026-05-09 04:36:23 +09:00
Timothy Jaeryang Baek
8ffc3d746f refac 2026-05-09 04:22:46 +09:00
Timothy Jaeryang Baek
c1202a2327 refac 2026-05-09 04:17:58 +09:00
Classic298
55d1db1f38 fix: stream GET /chats/all to prevent OOM on large chat histories (#24461)
Convert the /chats/all endpoint from loading all user chats into memory
at once to a streaming NDJSON response that fetches chats in batches of
100. This prevents Out-of-Memory crashes for users with large chat
histories.

Backend: Added async generator that paginates through chats with
short-lived DB sessions per batch (critical for SQLite lock release).

Frontend: Updated getAllChats to consume the NDJSON stream via
ReadableStream reader, accumulating results for the export file.

Ref: open-webui#22206
2026-05-09 04:11:52 +09:00
Timothy Jaeryang Baek
6082e1adae refac 2026-05-09 04:03:49 +09:00
Timothy Jaeryang Baek
c6763521c0 refac 2026-05-09 03:46:08 +09:00