Skip to content

Commit 203ec29

Browse files
authored
chore: remove unauthenticated dead-code GET /api/v1/retrieval/ status endpoint (open-webui#24497)
The `get_status()` handler at retrieval.py:263 (`@router.get('/')`) returned the live RAG pipeline configuration (CHUNK_SIZE, CHUNK_OVERLAP, RAG_TEMPLATE, RAG_EMBEDDING_ENGINE, RAG_EMBEDDING_MODEL, RAG_RERANKING_MODEL, etc.) without any authentication dependency, while every adjacent endpoint on the same router (/embedding, /embedding/update, /config, /config/update) requires get_admin_user. Exhaustive search of the repository confirms the endpoint has no callers: - Frontend (src/): no `RETRIEVAL_API_BASE_URL}/'`-style fetch; the existing `getRAGConfig()` in src/lib/apis/retrieval/index.ts targets `/config`, not the root, and is the only consumer of admin-level retrieval state. - Backend self-references: none. - Cypress e2e (chat, documents, registration, settings): none. - Backend tests (backend/open_webui/test/): none. - Build/CI scripts (scripts/): none. - Direct symbol import of `get_status` from this router: none. The endpoint is dead code, almost certainly a relic from before the /config GET split. Removing it has zero UX impact and eliminates the unauthenticated-config-disclosure surface raised in advisory triage on GHSA-65pg-qhhw-mxwg. External monitoring scripts that may have hit the bare root will receive a 404 and can switch to the existing /config endpoint, which returns the same fields plus the rest of the RAG config under admin auth. Surface raised by 0xRyuzak1 in GHSA-65pg-qhhw-mxwg. The advisory was closed as not-a-vulnerability per SECURITY.md Rule 1 (no security boundary crossed in default config — RAG_TEMPLATE default is a citation-format instruction, not a system prompt; no integrity/availability impact); this removal is independent code-hygiene that aligns the router cohort. Reported-by: 0xRyuzak1 <https://github.com/0xRyuzak1>
1 parent 9918ab6 commit 203ec29

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

backend/open_webui/routers/retrieval.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -260,22 +260,6 @@ class SearchForm(BaseModel):
260260
queries: List[str]
261261

262262

263-
@router.get('/')
264-
async def get_status(request: Request):
265-
return {
266-
'status': True,
267-
'CHUNK_SIZE': request.app.state.config.CHUNK_SIZE,
268-
'CHUNK_OVERLAP': request.app.state.config.CHUNK_OVERLAP,
269-
'RAG_TEMPLATE': request.app.state.config.RAG_TEMPLATE,
270-
'RAG_EMBEDDING_ENGINE': request.app.state.config.RAG_EMBEDDING_ENGINE,
271-
'RAG_EMBEDDING_MODEL': request.app.state.config.RAG_EMBEDDING_MODEL,
272-
'RAG_RERANKING_MODEL': request.app.state.config.RAG_RERANKING_MODEL,
273-
'RAG_EMBEDDING_BATCH_SIZE': request.app.state.config.RAG_EMBEDDING_BATCH_SIZE,
274-
'ENABLE_ASYNC_EMBEDDING': request.app.state.config.ENABLE_ASYNC_EMBEDDING,
275-
'RAG_EMBEDDING_CONCURRENT_REQUESTS': request.app.state.config.RAG_EMBEDDING_CONCURRENT_REQUESTS,
276-
}
277-
278-
279263
@router.get('/embedding')
280264
async def get_embedding_config(request: Request, user=Depends(get_admin_user)):
281265
return {

0 commit comments

Comments
 (0)