mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-11 10:03:05 -05:00
[PR #24756] fix: validate Playwright navigations and gate redirects in web loader #98861
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24756
Author: @Classic298
Created: 5/15/2026
Status: 🔄 Open
Base:
dev← Head:fix/playwright-redirect-ssrf📝 Commits (1)
202bd11fix: validate Playwright navigations and gate redirects in web loader📊 Changes
1 file changed (+58 additions, -0 deletions)
View changed files
📝
backend/open_webui/retrieval/web/utils.py(+58 -0)📄 Description
SafePlaywrightURLLoader validated only the initially submitted URL and then let the browser follow HTTP redirects and client-side navigations without re-checking them, so a public URL could redirect into the internal network (cloud metadata, RFC1918, loopback). Intercept document-type requests, re-run validate_url on each, and apply the same redirect policy as the requests loader (blocked unless AIOHTTP_CLIENT_ALLOW_REDIRECTS). Sub-resource requests pass through unchanged so page rendering performance is unaffected.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.