mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-06 02:48:04 +00:00
fix: add SSRF protection to OAuth profile picture URL fetching (#23356)
This commit is contained in:
parent
8977789177
commit
435efa31ce
1 changed files with 3 additions and 0 deletions
|
|
@ -81,6 +81,7 @@ from open_webui.utils.misc import parse_duration
|
|||
from open_webui.utils.auth import get_password_hash, create_token
|
||||
from open_webui.utils.webhook import post_webhook
|
||||
from open_webui.utils.groups import apply_default_group_assignment
|
||||
from open_webui.retrieval.web.utils import validate_url
|
||||
|
||||
from mcp.shared.auth import (
|
||||
OAuthClientMetadata as MCPOAuthClientMetadata,
|
||||
|
|
@ -1330,6 +1331,8 @@ class OAuthManager:
|
|||
return '/user.png'
|
||||
|
||||
try:
|
||||
validate_url(picture_url)
|
||||
|
||||
get_kwargs = {}
|
||||
if access_token:
|
||||
get_kwargs['headers'] = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue