Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f3a5bb0ab | ||
|
|
0c3ba5123e | ||
|
|
c513308ded | ||
|
|
1764170307 |
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.5.14] - 2025-02-17
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **🔧 Critical Import Error Resolved**: Fixed a circular import issue preventing 'override_static' from being correctly imported in 'open_webui.config', ensuring smooth system initialization and stability.
|
||||||
|
|
||||||
## [0.5.13] - 2025-02-17
|
## [0.5.13] - 2025-02-17
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -588,20 +588,6 @@ load_oauth_providers()
|
|||||||
|
|
||||||
STATIC_DIR = Path(os.getenv("STATIC_DIR", OPEN_WEBUI_DIR / "static")).resolve()
|
STATIC_DIR = Path(os.getenv("STATIC_DIR", OPEN_WEBUI_DIR / "static")).resolve()
|
||||||
|
|
||||||
|
|
||||||
def override_static(path: str, content: str):
|
|
||||||
# Ensure path is safe
|
|
||||||
if "/" in path or ".." in path:
|
|
||||||
log.error(f"Invalid path: {path}")
|
|
||||||
return
|
|
||||||
|
|
||||||
file_path = os.path.join(STATIC_DIR, path)
|
|
||||||
os.makedirs(os.path.dirname(file_path), exist_ok=True)
|
|
||||||
|
|
||||||
with open(file_path, "wb") as f:
|
|
||||||
f.write(base64.b64decode(content)) # Convert Base64 back to raw binary
|
|
||||||
|
|
||||||
|
|
||||||
frontend_favicon = FRONTEND_BUILD_DIR / "static" / "favicon.png"
|
frontend_favicon = FRONTEND_BUILD_DIR / "static" / "favicon.png"
|
||||||
|
|
||||||
if frontend_favicon.exists():
|
if frontend_favicon.exists():
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import base64
|
|||||||
import hmac
|
import hmac
|
||||||
import hashlib
|
import hashlib
|
||||||
import requests
|
import requests
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
from datetime import UTC, datetime, timedelta
|
from datetime import UTC, datetime, timedelta
|
||||||
@@ -13,8 +14,7 @@ from typing import Optional, Union, List, Dict
|
|||||||
from open_webui.models.users import Users
|
from open_webui.models.users import Users
|
||||||
|
|
||||||
from open_webui.constants import ERROR_MESSAGES
|
from open_webui.constants import ERROR_MESSAGES
|
||||||
from open_webui.config import override_static
|
from open_webui.env import WEBUI_SECRET_KEY, TRUSTED_SIGNATURE_KEY, STATIC_DIR
|
||||||
from open_webui.env import WEBUI_SECRET_KEY, TRUSTED_SIGNATURE_KEY
|
|
||||||
|
|
||||||
from fastapi import Depends, HTTPException, Request, Response, status
|
from fastapi import Depends, HTTPException, Request, Response, status
|
||||||
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
|
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
|
||||||
@@ -47,6 +47,19 @@ def verify_signature(payload: str, signature: str) -> bool:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def override_static(path: str, content: str):
|
||||||
|
# Ensure path is safe
|
||||||
|
if "/" in path or ".." in path:
|
||||||
|
print(f"Invalid path: {path}")
|
||||||
|
return
|
||||||
|
|
||||||
|
file_path = os.path.join(STATIC_DIR, path)
|
||||||
|
os.makedirs(os.path.dirname(file_path), exist_ok=True)
|
||||||
|
|
||||||
|
with open(file_path, "wb") as f:
|
||||||
|
f.write(base64.b64decode(content)) # Convert Base64 back to raw binary
|
||||||
|
|
||||||
|
|
||||||
def get_license_data(app, key):
|
def get_license_data(app, key):
|
||||||
if key:
|
if key:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "open-webui",
|
"name": "open-webui",
|
||||||
"version": "0.5.13",
|
"version": "0.5.14",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "open-webui",
|
"name": "open-webui",
|
||||||
"version": "0.5.13",
|
"version": "0.5.14",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/lang-javascript": "^6.2.2",
|
"@codemirror/lang-javascript": "^6.2.2",
|
||||||
"@codemirror/lang-python": "^6.1.6",
|
"@codemirror/lang-python": "^6.1.6",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "open-webui",
|
"name": "open-webui",
|
||||||
"version": "0.5.13",
|
"version": "0.5.14",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run pyodide:fetch && vite dev --host",
|
"dev": "npm run pyodide:fetch && vite dev --host",
|
||||||
|
|||||||
Reference in New Issue
Block a user