From 135dfdda9d926a913cb1a50ef0c0698515c8e718 Mon Sep 17 00:00:00 2001 From: Lan Date: Fri, 5 Jun 2026 11:28:22 +0800 Subject: [PATCH 01/33] fix: #464 serialize admin file list items safely --- apps/admin/services.py | 21 ++++++-- tests/test_issue_464_admin_file_list.py | 65 +++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 tests/test_issue_464_admin_file_list.py diff --git a/apps/admin/services.py b/apps/admin/services.py index a6549ba..3270e23 100644 --- a/apps/admin/services.py +++ b/apps/admin/services.py @@ -8,7 +8,7 @@ from core.response import APIResponse from core.storage import FileStorageInterface, storages from core.settings import settings from core.config import refresh_settings -from apps.base.models import FileCodes, KeyValue, file_codes_pydantic +from apps.base.models import FileCodes, KeyValue from apps.base.utils import get_expire_info, get_file_path_name from fastapi import HTTPException from core.settings import data_root @@ -553,8 +553,23 @@ class FileService: remaining_downloads = ( max(file_code.expired_count, 0) if file_code.expired_count >= 0 else None ) - item = await file_codes_pydantic.from_tortoise_orm(file_code) - data = item.model_dump() + data = { + "id": file_code.id, + "code": file_code.code, + "prefix": file_code.prefix, + "suffix": file_code.suffix, + "uuid_file_name": file_code.uuid_file_name, + "file_path": file_code.file_path, + "size": file_code.size or 0, + "text": file_code.text, + "expired_at": file_code.expired_at, + "expired_count": file_code.expired_count, + "used_count": file_code.used_count, + "created_at": file_code.created_at, + "file_hash": file_code.file_hash, + "is_chunked": file_code.is_chunked, + "upload_id": file_code.upload_id, + } data.update( { "name": name, diff --git a/tests/test_issue_464_admin_file_list.py b/tests/test_issue_464_admin_file_list.py new file mode 100644 index 0000000..38d21c9 --- /dev/null +++ b/tests/test_issue_464_admin_file_list.py @@ -0,0 +1,65 @@ +import asyncio +import unittest +from datetime import datetime, timedelta + +from apps.admin.services import FileService +from core.settings import settings + + +class SettingsOverrideMixin: + def setUp(self): + self._original_user_config = dict(settings.user_config) + + def tearDown(self): + settings.user_config = self._original_user_config + + +class FakeFileCode: + def __init__(self): + self.id = 1 + self.code = "ABC123" + self.prefix = "report" + self.suffix = ".txt" + self.uuid_file_name = "report.txt" + self.file_path = "share/data/2026/01/01/abc" + self.size = 12 + self.text = None + self.expired_at = datetime(2026, 1, 2, 12, 0, 0) + self.expired_count = 3 + self.used_count = 0 + self.created_at = datetime(2026, 1, 1, 12, 0, 0) + self.file_hash = "a" * 64 + self.is_chunked = False + self.upload_id = None + + async def is_expired(self): + return False + + +class AdminFileItemTests(SettingsOverrideMixin, unittest.TestCase): + def test_build_admin_file_item_serializes_required_fields(self): + settings.file_storage = "local" + service = FileService() + now = datetime(2026, 1, 1, 13, 0, 0) + + item = asyncio.run(service._build_admin_file_item(FakeFileCode(), now=now)) + + self.assertEqual(item["id"], 1) + self.assertEqual(item["name"], "report.txt") + self.assertEqual(item["type"], "file") + self.assertFalse(item["isExpired"]) + self.assertEqual(item["remainingDownloads"], 3) + self.assertEqual(item["file_path"], "share/data/2026/01/01/abc") + self.assertIn("never_retrieved", item["statusInsights"]["reasons"]) + self.assertEqual(item["statusInsights"]["metrics"]["ageSeconds"], 3600) + + def test_build_admin_file_item_marks_expiring_soon(self): + settings.file_storage = "local" + service = FileService() + file_code = FakeFileCode() + now = file_code.expired_at - timedelta(hours=2) + + item = asyncio.run(service._build_admin_file_item(file_code, now=now)) + + self.assertEqual(item["statusInsights"]["severity"], "warning") + self.assertIn("expires_soon", item["statusInsights"]["reasons"]) From aa6904a12c0c40bf73d8ed9f3c8cd162213efa5a Mon Sep 17 00:00:00 2001 From: Lan Date: Fri, 5 Jun 2026 11:29:37 +0800 Subject: [PATCH 02/33] fix: #465 restrict uploads by allowed file types --- apps/base/views.py | 36 +++++++++++++++++++++++++++++++ core/settings.py | 1 + main.py | 2 ++ tests/test_issue_465_file_type.py | 31 ++++++++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 tests/test_issue_465_file_type.py diff --git a/apps/base/views.py b/apps/base/views.py index 9d872ab..756c413 100644 --- a/apps/base/views.py +++ b/apps/base/views.py @@ -1,4 +1,5 @@ import datetime +from fnmatch import fnmatchcase import hashlib import os import uuid @@ -96,6 +97,38 @@ async def validate_file_size(file: UploadFile, max_size: int) -> int: return size +def normalize_allowed_file_types() -> list[str]: + raw_value = settings.allowed_file_types + if isinstance(raw_value, str): + values = raw_value.replace(";", ",").split(",") + elif isinstance(raw_value, (list, tuple, set)): + values = raw_value + else: + values = [] + + allowed = [str(item).strip().lower() for item in values if str(item).strip()] + return allowed or ["*"] + + +def validate_file_type(file_name: str, content_type: Optional[str] = None) -> None: + allowed = normalize_allowed_file_types() + if "*" in allowed or "*/*" in allowed: + return + + normalized_name = file_name.strip().lower() + normalized_content_type = (content_type or "").strip().lower() + + for rule in allowed: + if "/" in rule and fnmatchcase(normalized_content_type, rule): + return + + extension = rule if rule.startswith(".") else f".{rule}" + if normalized_name.endswith(extension): + return + + raise HTTPException(status_code=403, detail="不允许上传该类型文件") + + async def create_file_code(code, **kwargs): return await FileCodes.create(code=code, **kwargs) @@ -136,6 +169,7 @@ async def share_file( ip: str = Depends(ip_limit["upload"]), ): file_size = await validate_file_size(file, settings.uploadSize) + validate_file_type(file.filename or "", file.content_type) if expire_style not in settings.expireStyle: raise HTTPException(status_code=400, detail="过期时间类型错误") expired_at, expired_count, used_count, code = await get_expire_info( @@ -305,6 +339,7 @@ async def parse_complete_upload(request: Request) -> CompleteUploadModel: @chunk_api.post("/upload/init/", dependencies=[Depends(share_required_login)]) async def init_chunk_upload(data: InitChunkUploadModel = Depends(parse_init_chunk_upload)): + validate_file_type(data.file_name) # 服务端校验:根据 total_chunks * chunk_size 计算理论最大上传量 total_chunks = (data.file_size + data.chunk_size - 1) // data.chunk_size max_possible_size = total_chunks * data.chunk_size @@ -624,6 +659,7 @@ async def presign_upload_init( data: PresignUploadInitRequest, ip: str = Depends(ip_limit["upload"]) ): """初始化预签名上传,S3返回直传URL,其他存储返回代理URL""" + validate_file_type(data.file_name) if data.file_size > settings.uploadSize: raise HTTPException( 403, diff --git a/core/settings.py b/core/settings.py index c8f5e4b..930e673 100644 --- a/core/settings.py +++ b/core/settings.py @@ -40,6 +40,7 @@ DEFAULT_CONFIG = { "admin_token": "FileCodeBox2023", "openUpload": 1, "uploadSize": 1024 * 1024 * 10, + "allowed_file_types": ["*"], "expireStyle": ["day", "hour", "minute", "forever", "count"], "uploadMinute": 1, "enableChunk": 0, diff --git a/main.py b/main.py index 656ae12..fe27726 100644 --- a/main.py +++ b/main.py @@ -33,6 +33,7 @@ def build_public_config() -> dict: "description": settings.description, "explain": settings.page_explain, "uploadSize": settings.uploadSize, + "allowedFileTypes": settings.allowed_file_types, "expireStyle": settings.expireStyle, "enableChunk": settings.enableChunk, "openUpload": settings.openUpload, @@ -59,6 +60,7 @@ def build_public_meta() -> dict: }, "limits": { "uploadSize": settings.uploadSize, + "allowedFileTypes": settings.allowed_file_types, "maxSaveSeconds": settings.max_save_seconds, "uploadWindowMinutes": settings.uploadMinute, "uploadWindowCount": settings.uploadCount, diff --git a/tests/test_issue_465_file_type.py b/tests/test_issue_465_file_type.py new file mode 100644 index 0000000..d2bee8d --- /dev/null +++ b/tests/test_issue_465_file_type.py @@ -0,0 +1,31 @@ +import unittest + +from fastapi import HTTPException + +from apps.base.views import validate_file_type +from core.settings import settings + + +class SettingsOverrideMixin: + def setUp(self): + self._original_user_config = dict(settings.user_config) + + def tearDown(self): + settings.user_config = self._original_user_config + + +class FileTypeValidationTests(SettingsOverrideMixin, unittest.TestCase): + def test_allows_extensions_and_mime_patterns(self): + settings.allowed_file_types = ["rar", ".zip", "image/*"] + + validate_file_type("backup.RAR") + validate_file_type("archive.zip") + validate_file_type("avatar.bin", "image/png") + + def test_rejects_disallowed_file_type(self): + settings.allowed_file_types = ["rar"] + + with self.assertRaises(HTTPException) as error: + validate_file_type("payload.exe", "application/octet-stream") + + self.assertEqual(error.exception.status_code, 403) From 3fe136536e00516995fdc4a711c430be2b834516 Mon Sep 17 00:00:00 2001 From: Lan Date: Fri, 5 Jun 2026 11:32:31 +0800 Subject: [PATCH 03/33] fix: #461 support s3 path style addressing --- core/settings.py | 1 + core/storage.py | 80 +++++++++------------------ tests/test_issue_461_s3_addressing.py | 33 +++++++++++ 3 files changed, 61 insertions(+), 53 deletions(-) create mode 100644 tests/test_issue_461_s3_addressing.py diff --git a/core/settings.py b/core/settings.py index 930e673..a431ad9 100644 --- a/core/settings.py +++ b/core/settings.py @@ -26,6 +26,7 @@ DEFAULT_CONFIG = { "s3_region_name": "auto", "s3_signature_version": "s3v2", "s3_hostname": "", + "s3_addressing_style": "auto", "s3_proxy": 0, "max_save_seconds": 0, "aws_session_token": "", diff --git a/core/storage.py b/core/storage.py index a405626..8962982 100644 --- a/core/storage.py +++ b/core/storage.py @@ -267,6 +267,7 @@ class S3FileStorage(FileStorageInterface): self.signature_version = settings.s3_signature_version self.endpoint_url = settings.s3_endpoint_url or f"https://{self.s3_hostname}" self.aws_session_token = settings.aws_session_token + self.addressing_style = str(settings.s3_addressing_style or "auto").lower() self.proxy = settings.s3_proxy self.session = aioboto3.Session( aws_access_key_id=self.access_key_id, @@ -278,14 +279,26 @@ class S3FileStorage(FileStorageInterface): # 如果提供了 s3_endpoint_url,则优先使用它 self.endpoint_url = settings.s3_endpoint_url + def _client_config(self) -> Config: + config = {"signature_version": self.signature_version} + s3_config = {} + if self.addressing_style in {"path", "virtual", "auto"}: + s3_config["addressing_style"] = self.addressing_style + if s3_config: + config["s3"] = s3_config + return Config(**config) + + def _client(self): + return self.session.client( + "s3", + endpoint_url=self.endpoint_url, + aws_session_token=self.aws_session_token, + region_name=self.region_name, + config=self._client_config(), + ) + async def save_file(self, file: UploadFile, save_path: str): - async with self.session.client( - "s3", - endpoint_url=self.endpoint_url, - aws_session_token=self.aws_session_token, - region_name=self.region_name, - config=Config(signature_version=self.signature_version), - ) as s3: + async with self._client() as s3: # 使用 upload_fileobj 流式上传,避免将整个文件加载到内存 await s3.upload_fileobj( file.file, @@ -295,12 +308,7 @@ class S3FileStorage(FileStorageInterface): ) async def delete_file(self, file_code: FileCodes): - async with self.session.client( - "s3", - endpoint_url=self.endpoint_url, - region_name=self.region_name, - config=Config(signature_version=self.signature_version), - ) as s3: + async with self._client() as s3: await s3.delete_object( Bucket=self.bucket_name, Key=await file_code.get_file_path() ) @@ -310,12 +318,7 @@ class S3FileStorage(FileStorageInterface): filename = file_code.prefix + file_code.suffix content_length = None # 初始化为 None,表示未知大小 - async with self.session.client( - "s3", - endpoint_url=self.endpoint_url, - region_name=self.region_name, - config=Config(signature_version=self.signature_version), - ) as s3: + async with self._client() as s3: # 尝试获取文件大小(HEAD请求) try: head_response = await s3.head_object( @@ -384,12 +387,7 @@ class S3FileStorage(FileStorageInterface): if self.proxy: return await get_file_url(file_code.code) else: - async with self.session.client( - "s3", - endpoint_url=self.endpoint_url, - region_name=self.region_name, - config=Config(signature_version=self.signature_version), - ) as s3: + async with self._client() as s3: result = await s3.generate_presigned_url( "get_object", Params={ @@ -406,13 +404,7 @@ class S3FileStorage(FileStorageInterface): 注意:这里不使用 S3 原生的 multipart upload,而是将每个分片作为独立对象存储 """ chunk_key = str(Path(save_path).parent / "chunks" / upload_id / f"{chunk_index}.part") - async with self.session.client( - 's3', - endpoint_url=self.endpoint_url, - aws_session_token=self.aws_session_token, - region_name=self.region_name, - config=Config(signature_version=self.signature_version), - ) as s3: + async with self._client() as s3: # 将分片作为独立对象上传 await s3.put_object( Bucket=self.bucket_name, @@ -432,13 +424,7 @@ class S3FileStorage(FileStorageInterface): file_sha256 = hashlib.sha256() chunk_dir = str(Path(save_path).parent / "chunks" / upload_id) - async with self.session.client( - 's3', - endpoint_url=self.endpoint_url, - aws_session_token=self.aws_session_token, - region_name=self.region_name, - config=Config(signature_version=self.signature_version), - ) as s3: + async with self._client() as s3: # 创建 multipart upload mpu = await s3.create_multipart_upload( Bucket=self.bucket_name, @@ -512,13 +498,7 @@ class S3FileStorage(FileStorageInterface): :param save_path: 文件保存路径 """ chunk_dir = str(Path(save_path).parent / "chunks" / upload_id) - async with self.session.client( - 's3', - endpoint_url=self.endpoint_url, - aws_session_token=self.aws_session_token, - region_name=self.region_name, - config=Config(signature_version=self.signature_version), - ) as s3: + async with self._client() as s3: try: # 列出并删除所有分片对象 paginator = s3.get_paginator('list_objects_v2') @@ -540,13 +520,7 @@ class S3FileStorage(FileStorageInterface): :param expires_in: URL过期时间(秒),默认15分钟 :return: 预签名PUT URL """ - async with self.session.client( - "s3", - endpoint_url=self.endpoint_url, - aws_session_token=self.aws_session_token, - region_name=self.region_name, - config=Config(signature_version=self.signature_version), - ) as s3: + async with self._client() as s3: return await s3.generate_presigned_url( "put_object", Params={ diff --git a/tests/test_issue_461_s3_addressing.py b/tests/test_issue_461_s3_addressing.py new file mode 100644 index 0000000..9ff6ecd --- /dev/null +++ b/tests/test_issue_461_s3_addressing.py @@ -0,0 +1,33 @@ +import unittest + +from core.settings import settings +from core.storage import S3FileStorage + + +class SettingsOverrideMixin: + def setUp(self): + self._original_user_config = dict(settings.user_config) + + def tearDown(self): + settings.user_config = self._original_user_config + + +class S3StorageConfigTests(SettingsOverrideMixin, unittest.TestCase): + def test_client_config_uses_path_style_when_configured(self): + storage = S3FileStorage.__new__(S3FileStorage) + storage.signature_version = "s3v4" + storage.addressing_style = "path" + + config = storage._client_config() + + self.assertEqual(config.signature_version, "s3v4") + self.assertEqual(config.s3["addressing_style"], "path") + + def test_client_config_ignores_invalid_addressing_style(self): + storage = S3FileStorage.__new__(S3FileStorage) + storage.signature_version = "s3v4" + storage.addressing_style = "invalid" + + config = storage._client_config() + + self.assertIsNone(config.s3) From 8d6eaacb70aefc63c9b48c27810c5adc2fa0685e Mon Sep 17 00:00:00 2001 From: Lan Date: Fri, 5 Jun 2026 11:33:21 +0800 Subject: [PATCH 04/33] fix: #478 make s3 upload confirmation resilient --- core/storage.py | 35 ++++++++++++++------ tests/test_issue_478_s3_file_exists.py | 46 ++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 11 deletions(-) create mode 100644 tests/test_issue_478_s3_file_exists.py diff --git a/core/storage.py b/core/storage.py index 8962982..173da3e 100644 --- a/core/storage.py +++ b/core/storage.py @@ -536,18 +536,31 @@ class S3FileStorage(FileStorageInterface): :param save_path: 文件路径 :return: 文件是否存在 """ - async with self.session.client( - "s3", - endpoint_url=self.endpoint_url, - aws_session_token=self.aws_session_token, - region_name=self.region_name, - config=Config(signature_version=self.signature_version), - ) as s3: + async with self._client() as s3: + last_error = None + for attempt in range(3): + try: + await s3.head_object(Bucket=self.bucket_name, Key=save_path) + return True + except Exception as e: + last_error = e + if attempt < 2: + await asyncio.sleep(0.2 * (attempt + 1)) + try: - await s3.head_object(Bucket=self.bucket_name, Key=save_path) - return True - except Exception: - return False + result = await s3.list_objects_v2( + Bucket=self.bucket_name, + Prefix=save_path, + MaxKeys=1, + ) + for item in result.get("Contents", []): + if item.get("Key") == save_path: + return True + except Exception as e: + last_error = e + + logger.warning(f"S3文件确认失败 key={save_path}: {last_error}") + return False class OneDriveFileStorage(FileStorageInterface): diff --git a/tests/test_issue_478_s3_file_exists.py b/tests/test_issue_478_s3_file_exists.py new file mode 100644 index 0000000..5f1d214 --- /dev/null +++ b/tests/test_issue_478_s3_file_exists.py @@ -0,0 +1,46 @@ +import asyncio +import unittest + +from core.storage import S3FileStorage + + +class FakeS3Client: + def __init__(self, list_response): + self.list_response = list_response + self.head_calls = 0 + + async def __aenter__(self): + return self + + async def __aexit__(self, exc_type, exc, traceback): + return False + + async def head_object(self, **kwargs): + self.head_calls += 1 + raise RuntimeError("head not supported") + + async def list_objects_v2(self, **kwargs): + return self.list_response + + +class S3FileExistsTests(unittest.TestCase): + def test_file_exists_falls_back_to_list_objects(self): + client = FakeS3Client({"Contents": [{"Key": "share/data/file.txt"}]}) + storage = S3FileStorage.__new__(S3FileStorage) + storage.bucket_name = "bucket" + storage._client = lambda: client + + exists = asyncio.run(storage.file_exists("share/data/file.txt")) + + self.assertTrue(exists) + self.assertEqual(client.head_calls, 3) + + def test_file_exists_returns_false_when_missing(self): + client = FakeS3Client({"Contents": [{"Key": "share/data/other.txt"}]}) + storage = S3FileStorage.__new__(S3FileStorage) + storage.bucket_name = "bucket" + storage._client = lambda: client + + exists = asyncio.run(storage.file_exists("share/data/file.txt")) + + self.assertFalse(exists) From 1d03337e2f55bb7141ac8fcfa93f6dd3487bbd9a Mon Sep 17 00:00:00 2001 From: Lan Date: Fri, 5 Jun 2026 11:37:44 +0800 Subject: [PATCH 05/33] fix: #476 serve assets from selected theme --- main.py | 48 ++++++++++++++++++++-------- tests/test_issue_476_theme_assets.py | 44 +++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 14 deletions(-) create mode 100644 tests/test_issue_476_theme_assets.py diff --git a/main.py b/main.py index fe27726..7b69a20 100644 --- a/main.py +++ b/main.py @@ -6,10 +6,9 @@ import asyncio import time from contextlib import asynccontextmanager -from fastapi import FastAPI +from fastapi import FastAPI, HTTPException from fastapi.middleware.cors import CORSMiddleware -from fastapi.responses import HTMLResponse -from fastapi.staticfiles import StaticFiles +from fastapi.responses import FileResponse, HTMLResponse from tortoise import Tortoise from tortoise.contrib.fastapi import register_tortoise @@ -77,12 +76,6 @@ async def lifespan(app: FastAPI): # 加载配置(多进程下串行化启动写操作) async with db_startup_lock(): await load_config() - app.mount( - "/assets", - StaticFiles(directory=f"./{settings.themesSelect}/assets"), - name="assets", - ) - # 启动后台任务 task = asyncio.create_task(delete_expire_files()) chunk_cleanup_task = asyncio.create_task(clean_incomplete_uploads()) @@ -156,19 +149,46 @@ app.include_router(presign_api, prefix="/api") app.include_router(admin_api) +def resolve_theme_root(): + themes_root = (BASE_DIR / "themes").resolve() + theme_root = (BASE_DIR / str(settings.themesSelect)).resolve() + try: + theme_root.relative_to(themes_root) + except ValueError: + theme_root = (BASE_DIR / DEFAULT_CONFIG["themesSelect"]).resolve() + if not theme_root.exists(): + theme_root = (BASE_DIR / DEFAULT_CONFIG["themesSelect"]).resolve() + return theme_root + + +def resolve_theme_file(*parts: str): + theme_root = resolve_theme_root() + file_path = theme_root.joinpath(*parts).resolve() + # 防止通过 /assets/../ 读取主题目录外的文件。 + try: + file_path.relative_to(theme_root) + except ValueError: + raise HTTPException(status_code=404, detail="资源不存在") + if not file_path.is_file(): + raise HTTPException(status_code=404, detail="资源不存在") + return file_path + + +@app.get("/assets/{asset_path:path}", include_in_schema=False) +async def theme_asset(asset_path: str): + return FileResponse(resolve_theme_file("assets", asset_path)) + + @app.exception_handler(404) @app.get("/") async def index(request=None, exc=None): return HTMLResponse( - content=open( - BASE_DIR / f"{settings.themesSelect}/index.html", "r", encoding="utf-8" - ) - .read() + content=resolve_theme_file("index.html") + .read_text(encoding="utf-8") .replace("{{title}}", str(settings.name)) .replace("{{description}}", str(settings.description)) .replace("{{keywords}}", str(settings.keywords)) .replace("{{opacity}}", str(settings.opacity)) - .replace('"/assets/', '"assets/') .replace("{{background}}", str(settings.background)), media_type="text/html", headers={"Cache-Control": "no-cache"}, diff --git a/tests/test_issue_476_theme_assets.py b/tests/test_issue_476_theme_assets.py new file mode 100644 index 0000000..5041607 --- /dev/null +++ b/tests/test_issue_476_theme_assets.py @@ -0,0 +1,44 @@ +import asyncio +import unittest + +from fastapi import HTTPException + +from core.settings import settings +from main import index, resolve_theme_file + + +class SettingsOverrideMixin: + def setUp(self): + self._original_user_config = dict(settings.user_config) + + def tearDown(self): + settings.user_config = self._original_user_config + + +class ThemeAssetTests(SettingsOverrideMixin, unittest.TestCase): + def test_resolves_assets_from_current_theme(self): + settings.themesSelect = "themes/2023" + theme_2023_asset = resolve_theme_file("assets", "index-CxMsK_Ni.js") + + settings.themesSelect = "themes/2024" + theme_2024_asset = resolve_theme_file("assets", "index-DjzJA_Oj.js") + + self.assertIn("themes/2023/assets", str(theme_2023_asset)) + self.assertIn("themes/2024/assets", str(theme_2024_asset)) + + def test_rejects_theme_asset_path_traversal(self): + settings.themesSelect = "themes/2024" + + with self.assertRaises(HTTPException) as error: + resolve_theme_file("assets", "..", "..", "core", "settings.py") + + self.assertEqual(error.exception.status_code, 404) + + def test_index_keeps_absolute_asset_urls(self): + settings.themesSelect = "themes/2023" + + response = asyncio.run(index()) + html = response.body.decode("utf-8") + + self.assertIn('src="/assets/', html) + self.assertIn('href="/assets/', html) From c1fb802223441a0ff9d8e2bde8dfd3ba00d11016 Mon Sep 17 00:00:00 2001 From: Lan Date: Fri, 5 Jun 2026 11:40:11 +0800 Subject: [PATCH 06/33] fix: #473 normalize retrieve codes before lookup --- apps/base/views.py | 14 ++++++++--- tests/test_issue_473_retrieve_code.py | 34 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 tests/test_issue_473_retrieve_code.py diff --git a/apps/base/views.py b/apps/base/views.py index 756c413..b56e717 100644 --- a/apps/base/views.py +++ b/apps/base/views.py @@ -133,6 +133,10 @@ async def create_file_code(code, **kwargs): return await FileCodes.create(code=code, **kwargs) +def normalize_share_code(code: str) -> str: + return str(code or "").strip() + + @share_api.post("/text/", dependencies=[Depends(share_required_login)]) async def share_text( text: str = Form(...), @@ -196,7 +200,10 @@ async def share_file( async def get_code_file_by_code( code: str, check: bool = True ) -> Tuple[bool, Union[FileCodes, str]]: - file_code = await FileCodes.filter(code=code).first() + normalized_code = normalize_share_code(code) + if not normalized_code: + return False, "文件不存在" + file_code = await FileCodes.filter(code=normalized_code).first() if not file_code: return False, "文件不存在" if await file_code.is_expired() and check: @@ -298,10 +305,11 @@ async def select_file(data: SelectFileModel, ip: str = Depends(ip_limit["error"] @share_api.get("/download") async def download_file(key: str, code: str, ip: str = Depends(ip_limit["error"])): file_storage: FileStorageInterface = storages[settings.file_storage]() - if await get_select_token(code) != key: + normalized_code = normalize_share_code(code) + if await get_select_token(normalized_code) != key: ip_limit["error"].add_ip(ip) raise HTTPException(status_code=403, detail="下载鉴权失败") - has, file_code = await get_code_file_by_code(code, False) + has, file_code = await get_code_file_by_code(normalized_code, False) if not has: return APIResponse(code=404, detail="文件不存在") assert isinstance(file_code, FileCodes) diff --git a/tests/test_issue_473_retrieve_code.py b/tests/test_issue_473_retrieve_code.py new file mode 100644 index 0000000..cdc9086 --- /dev/null +++ b/tests/test_issue_473_retrieve_code.py @@ -0,0 +1,34 @@ +import asyncio +import unittest + +import apps.base.views as views +from apps.base.views import normalize_share_code + + +class FakeFileCodes: + seen_code = None + + @classmethod + def filter(cls, **kwargs): + cls.seen_code = kwargs.get("code") + return cls() + + async def first(self): + return None + + +class RetrieveCodeTests(unittest.TestCase): + def test_normalize_share_code_strips_surrounding_whitespace(self): + self.assertEqual(normalize_share_code(" 12345\n"), "12345") + + def test_get_code_file_by_code_queries_normalized_code(self): + original_file_codes = views.FileCodes + views.FileCodes = FakeFileCodes + try: + has_file, message = asyncio.run(views.get_code_file_by_code(" 12345\n")) + finally: + views.FileCodes = original_file_codes + + self.assertFalse(has_file) + self.assertEqual(message, "文件不存在") + self.assertEqual(FakeFileCodes.seen_code, "12345") From eb6fc627aece0ee3543c57af942e4f8f5e3e1aa6 Mon Sep 17 00:00:00 2001 From: Lan <48862574+vastsa@users.noreply.github.com> Date: Fri, 5 Jun 2026 21:14:37 +0800 Subject: [PATCH 07/33] feat: update me --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 3733798..63c46e0 100644 --- a/readme.md +++ b/readme.md @@ -468,4 +468,5 @@ git push origin feature/your-feature Made with ❤️ by [vastsa](https://github.com/vastsa) + From 1b6d8e7277d3cfa34dc7a85803731d927b2147da Mon Sep 17 00:00:00 2001 From: Lan Date: Tue, 9 Jun 2026 00:53:11 +0800 Subject: [PATCH 08/33] fix: harden share rate limit and code generation (#479) --- apps/base/dependencies.py | 70 +++++++++++++++++++++++++++++++++++---- apps/base/utils.py | 23 ++++++++++--- core/settings.py | 2 ++ core/utils.py | 6 ++-- 4 files changed, 88 insertions(+), 13 deletions(-) diff --git a/apps/base/dependencies.py b/apps/base/dependencies.py index 577a2dc..7235bde 100644 --- a/apps/base/dependencies.py +++ b/apps/base/dependencies.py @@ -1,7 +1,69 @@ -from typing import Dict, Union +from ipaddress import ip_address, ip_network +from typing import Dict, Iterable, Union from datetime import datetime, timedelta from fastapi import HTTPException, Request +from core.settings import settings + + +def _iter_trusted_proxies() -> Iterable[str]: + trusted_proxies = getattr(settings, "trustedProxies", []) + if isinstance(trusted_proxies, str): + trusted_proxies = [item.strip() for item in trusted_proxies.split(",")] + return [item for item in trusted_proxies if item] + + +def _is_trusted_proxy(host: str) -> bool: + try: + remote_addr = ip_address(host) + except ValueError: + return False + + for proxy in _iter_trusted_proxies(): + try: + if remote_addr in ip_network(proxy, strict=False): + return True + except ValueError: + continue + return False + + +def _get_forwarded_for_ip(header_value: str, fallback_ip: str) -> str: + forwarded_chain = [ + item.strip() for item in header_value.split(",") if item.strip() + ] + if not forwarded_chain: + return fallback_ip + + for candidate in reversed(forwarded_chain): + try: + ip_address(candidate) + except ValueError: + return fallback_ip + if not _is_trusted_proxy(candidate): + return candidate + return forwarded_chain[0] + + +def get_client_ip(request: Request) -> str: + client_host = request.client.host if request.client else "unknown" + if not _is_trusted_proxy(client_host): + return client_host + + forwarded_for = request.headers.get("X-Forwarded-For") + if forwarded_for: + return _get_forwarded_for_ip(forwarded_for, client_host) + + real_ip = request.headers.get("X-Real-IP") + if real_ip: + try: + ip_address(real_ip) + except ValueError: + return client_host + return real_ip + + return client_host + class IPRateLimit: def __init__(self, count: int, minutes: int): @@ -35,11 +97,7 @@ class IPRateLimit: } def __call__(self, request: Request) -> str: - ip = ( - request.headers.get("X-Real-IP") - or request.headers.get("X-Forwarded-For") - or request.client.host - ) + ip = get_client_ip(request) if not self.check_ip(ip): raise HTTPException(status_code=423, detail="请求次数过多,请稍后再试") return ip diff --git a/apps/base/utils.py b/apps/base/utils.py index 70c76f2..891a383 100644 --- a/apps/base/utils.py +++ b/apps/base/utils.py @@ -76,8 +76,6 @@ async def get_expire_info( expired_at, extra = result if expire_style == "count": expired_count = extra - elif expire_style == "forever": - code = await get_random_code(style="string") else: expired_at = result if expired_at and expired_at - now > max_timedelta: @@ -91,9 +89,26 @@ async def get_expire_info( return expired_at, expired_count, used_count, code -async def get_random_code(style: str = "num") -> str: +def get_code_generate_type() -> str: + code_generate_type = getattr(settings, "code_generate_type", "number") + if code_generate_type in {"secret", "string"}: + return "secret" + return "number" + + +async def get_random_code(style: str | None = None) -> str: + code_style = style or get_code_generate_type() + if code_style == "num": + code_style = "number" + if code_style == "string": + code_style = "secret" + while True: - code = await get_random_num() if style == "num" else await get_random_string() + code = ( + await get_random_num() + if code_style == "number" + else await get_random_string() + ) if not await FileCodes.filter(code=code).exists(): return str(code) diff --git a/core/settings.py b/core/settings.py index a431ad9..919dae1 100644 --- a/core/settings.py +++ b/core/settings.py @@ -43,6 +43,7 @@ DEFAULT_CONFIG = { "uploadSize": 1024 * 1024 * 10, "allowed_file_types": ["*"], "expireStyle": ["day", "hour", "minute", "forever", "count"], + "code_generate_type": "number", "uploadMinute": 1, "enableChunk": 0, "webdav_url": "", @@ -73,6 +74,7 @@ DEFAULT_CONFIG = { "serverPort": 12345, "showAdminAddr": 0, "robotsText": "User-agent: *\nDisallow: /", + "trustedProxies": [], } diff --git a/core/utils.py b/core/utils.py index 0aca619..6085fdb 100644 --- a/core/utils.py +++ b/core/utils.py @@ -5,8 +5,8 @@ import datetime import hashlib import os -import random import re +import secrets import string import time @@ -18,7 +18,7 @@ async def get_random_num(): 获取随机数 :return: """ - return random.randint(10000, 99999) + return secrets.randbelow(90000) + 10000 r_s = string.ascii_uppercase + string.digits @@ -29,7 +29,7 @@ async def get_random_string(): 获取随机字符串 :return: """ - return "".join(random.choice(r_s) for _ in range(5)) + return "".join(secrets.choice(r_s) for _ in range(5)) async def get_now(): From cdaf3638b80a12f0b22e620815653c7e065916f1 Mon Sep 17 00:00:00 2001 From: Lan Date: Tue, 16 Jun 2026 00:49:43 +0800 Subject: [PATCH 09/33] feat: add first-run setup security flow --- apps/admin/dependencies.py | 13 +- apps/admin/services.py | 18 +- core/config.py | 95 +++- core/security.py | 60 +++ core/settings.py | 3 +- core/utils.py | 4 +- core/version.py | 2 +- docs/api/index.md | 4 +- docs/en/api/index.md | 4 +- docs/en/guide/configuration.md | 4 +- docs/en/guide/getting-started.md | 5 +- docs/en/guide/management.md | 9 +- docs/en/guide/security.md | 6 +- docs/en/guide/upload.md | 2 +- docs/guide/configuration.md | 4 +- docs/guide/getting-started.md | 5 +- docs/guide/management.md | 11 +- docs/guide/security.md | 6 +- docs/guide/upload.md | 2 +- main.py | 690 ++++++++++++++++++++++++++- readme.md | 4 +- readme_en.md | 4 +- tests/test_admin_security.py | 221 +++++++++ tests/test_issue_476_theme_assets.py | 15 +- 24 files changed, 1127 insertions(+), 64 deletions(-) create mode 100644 core/security.py create mode 100644 tests/test_admin_security.py diff --git a/apps/admin/dependencies.py b/apps/admin/dependencies.py index e648628..2e8febc 100644 --- a/apps/admin/dependencies.py +++ b/apps/admin/dependencies.py @@ -12,6 +12,13 @@ from core.settings import settings from apps.admin.services import FileService, ConfigService, LocalFileService +def _get_jwt_secret() -> bytes: + secret = getattr(settings, "jwt_secret", "") + if not secret: + raise RuntimeError("JWT签名密钥未初始化") + return secret.encode() + + def create_token(data: dict, expires_in: int = 3600 * 24 * 30) -> str: """ 创建JWT token @@ -25,9 +32,7 @@ def create_token(data: dict, expires_in: int = 3600 * 24 * 30) -> str: json.dumps({**data, "exp": int(time.time()) + expires_in}).encode() ).decode() - signature = hmac.new( - settings.admin_token.encode(), f"{header}.{payload}".encode(), "sha256" - ).digest() + signature = hmac.new(_get_jwt_secret(), f"{header}.{payload}".encode(), "sha256").digest() signature = base64.b64encode(signature).decode() return f"{header}.{payload}.{signature}" @@ -44,7 +49,7 @@ def verify_token(token: str) -> dict: # 验证签名 expected_signature = hmac.new( - settings.admin_token.encode(), + _get_jwt_secret(), f"{header_b64}.{payload_b64}".encode(), "sha256", ).digest() diff --git a/apps/admin/services.py b/apps/admin/services.py index 3270e23..684e569 100644 --- a/apps/admin/services.py +++ b/apps/admin/services.py @@ -8,6 +8,7 @@ from core.response import APIResponse from core.storage import FileStorageInterface, storages from core.settings import settings from core.config import refresh_settings +from core.security import INTERNAL_CONFIG_KEYS, generate_jwt_secret from apps.base.models import FileCodes, KeyValue from apps.base.utils import get_expire_info, get_file_path_name from fastapi import HTTPException @@ -1514,20 +1515,30 @@ class ConfigService: FLOAT_FIELDS = {"opacity"} def get_config(self): - return dict(settings.items()) + config = dict(settings.items()) + config["admin_token"] = "" + for key in INTERNAL_CONFIG_KEYS: + config.pop(key, None) + return config async def update_config(self, data: dict): current_config = dict(settings.items()) next_config = dict(current_config) update_data = { - key: value for key, value in data.items() if key in settings.default_config + key: value + for key, value in data.items() + if key in settings.default_config and key not in INTERNAL_CONFIG_KEYS } admin_token = update_data.get("admin_token") + admin_password_changed = False if admin_token is None or admin_token == "": update_data.pop("admin_token", None) elif not is_password_hashed(admin_token): update_data["admin_token"] = hash_password(admin_token) + admin_password_changed = True + else: + admin_password_changed = True for key, value in update_data.items(): if value == "" and key in self.INT_FIELDS | self.FLOAT_FIELDS: @@ -1543,6 +1554,9 @@ class ConfigService: except (TypeError, ValueError): raise HTTPException(status_code=400, detail=f"{key} 配置值格式错误") + if admin_password_changed: + next_config["jwt_secret"] = generate_jwt_secret() + await KeyValue.update_or_create(key="settings", defaults={"value": next_config}) await refresh_settings() diff --git a/core/config.py b/core/config.py index a2dd349..fdc3e9b 100644 --- a/core/config.py +++ b/core/config.py @@ -1,10 +1,64 @@ from apps.base.models import KeyValue from apps.base.utils import ip_limit +from core.database import db_startup_lock +from core.logger import logger +from core.security import ( + generate_jwt_secret, + is_config_initialized, + is_valid_jwt_secret, + prepare_security_config, +) from core.settings import DEFAULT_CONFIG, settings +from core.utils import hash_password + + +MIN_ADMIN_PASSWORD_LENGTH = 8 +SETUP_CONFIG_FIELDS = { + "allowed_file_types", + "code_generate_type", + "enableChunk", + "errorCount", + "errorMinute", + "expireStyle", + "max_save_seconds", + "name", + "openUpload", + "uploadCount", + "uploadMinute", + "uploadSize", +} async def ensure_settings_row() -> None: - await KeyValue.get_or_create(key="settings", defaults={"value": DEFAULT_CONFIG}) + initial_security = prepare_security_config(DEFAULT_CONFIG) + _, created = await KeyValue.get_or_create( + key="settings", defaults={"value": initial_security.config} + ) + if created: + logger.warning( + "系统尚未初始化,请在浏览器中打开站点并完成管理员密码设置" + ) + + +async def ensure_security_settings() -> None: + config_record = await KeyValue.filter(key="settings").first() + if not config_record: + return + + current_config = {**DEFAULT_CONFIG, **(config_record.value or {})} + security_config = prepare_security_config(current_config) + if not security_config.changed: + return + + config_record.value = security_config.config + await config_record.save() + if security_config.setup_required: + logger.warning("检测到空密码或旧版默认管理员密码,请通过初始化页面重新设置") + elif security_config.password_hashed: + logger.info("已将管理员密码迁移为哈希存储") + if security_config.jwt_secret_rotated: + logger.info("已生成独立 JWT 签名密钥") + await refresh_settings() def _sync_ip_limits() -> None: @@ -19,3 +73,42 @@ async def refresh_settings() -> None: config_record = await KeyValue.filter(key="settings").first() settings.user_config = config_record.value if config_record and config_record.value else {} _sync_ip_limits() + + +def is_runtime_initialized() -> bool: + return is_config_initialized(dict(settings.items())) + + +async def initialize_system( + admin_password: str, + site_name: str | None = None, + setup_options: dict | None = None, +) -> None: + password = str(admin_password or "").strip() + if len(password) < MIN_ADMIN_PASSWORD_LENGTH: + raise ValueError(f"管理员密码至少需要 {MIN_ADMIN_PASSWORD_LENGTH} 位") + + async with db_startup_lock(): + config_record = await KeyValue.filter(key="settings").first() + current_config = { + **DEFAULT_CONFIG, + **(config_record.value if config_record and config_record.value else {}), + } + if is_config_initialized(current_config): + raise ValueError("系统已经初始化,请直接登录后台") + + next_config = dict(current_config) + for key, value in (setup_options or {}).items(): + if key in SETUP_CONFIG_FIELDS: + next_config[key] = value + + normalized_site_name = str(site_name or "").strip() + if normalized_site_name: + next_config["name"] = normalized_site_name[:80] + + next_config["admin_token"] = hash_password(password) + if not is_valid_jwt_secret(next_config.get("jwt_secret")): + next_config["jwt_secret"] = generate_jwt_secret() + + await KeyValue.update_or_create(key="settings", defaults={"value": next_config}) + await refresh_settings() diff --git a/core/security.py b/core/security.py new file mode 100644 index 0000000..7625287 --- /dev/null +++ b/core/security.py @@ -0,0 +1,60 @@ +import copy +import secrets +from dataclasses import dataclass +from typing import Any + +from core.utils import hash_password, is_password_hashed, verify_password + + +JWT_SECRET_MIN_LENGTH = 32 +INTERNAL_CONFIG_KEYS = {"jwt_secret"} +LEGACY_DEFAULT_ADMIN_TOKEN = "FileCodeBox" + "2023" + + +@dataclass +class SecurityConfigResult: + config: dict[str, Any] + changed: bool = False + password_hashed: bool = False + jwt_secret_rotated: bool = False + setup_required: bool = False + + +def generate_jwt_secret() -> str: + return secrets.token_urlsafe(48) + + +def is_valid_jwt_secret(secret: Any) -> bool: + return isinstance(secret, str) and len(secret) >= JWT_SECRET_MIN_LENGTH + + +def is_config_initialized(config: dict[str, Any]) -> bool: + admin_token = str(config.get("admin_token") or "") + if not admin_token: + return False + return not verify_password(LEGACY_DEFAULT_ADMIN_TOKEN, admin_token) + + +def prepare_security_config(config: dict[str, Any]) -> SecurityConfigResult: + next_config = copy.deepcopy(config) + result = SecurityConfigResult(config=next_config) + + admin_token = str(next_config.get("admin_token") or "") + if not admin_token: + result.setup_required = True + elif verify_password(LEGACY_DEFAULT_ADMIN_TOKEN, admin_token): + next_config["admin_token"] = "" + result.setup_required = True + result.changed = True + elif not is_password_hashed(admin_token): + next_config["admin_token"] = hash_password(admin_token) + result.password_hashed = True + result.changed = True + + jwt_secret = next_config.get("jwt_secret") + if not is_valid_jwt_secret(jwt_secret): + next_config["jwt_secret"] = generate_jwt_secret() + result.jwt_secret_rotated = True + result.changed = True + + return result diff --git a/core/settings.py b/core/settings.py index 919dae1..40d7ba4 100644 --- a/core/settings.py +++ b/core/settings.py @@ -38,7 +38,8 @@ DEFAULT_CONFIG = { "onedrive_proxy": 0, "webdav_root_path": "filebox_storage", "webdav_proxy": 0, - "admin_token": "FileCodeBox2023", + "admin_token": "", + "jwt_secret": "", "openUpload": 1, "uploadSize": 1024 * 1024 * 10, "allowed_file_types": ["*"], diff --git a/core/utils.py b/core/utils.py index 6085fdb..a762f55 100644 --- a/core/utils.py +++ b/core/utils.py @@ -46,7 +46,9 @@ async def get_select_token(code: str): :param code: :return: """ - token = settings.admin_token + token = getattr(settings, "jwt_secret", "") + if not token: + raise RuntimeError("应用签名密钥未初始化") return hashlib.sha256( f"{code}{int(time.time() / 1000)}000{token}".encode() ).hexdigest() diff --git a/core/version.py b/core/version.py index 5599691..bb219e8 100644 --- a/core/version.py +++ b/core/version.py @@ -1 +1 @@ -APP_VERSION = "2.0.0-dev" +APP_VERSION = "2.4.0" diff --git a/docs/api/index.md b/docs/api/index.md index 2b2cac0..aefbde3 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -22,7 +22,7 @@ Authorization: Bearer ```bash curl -X POST "http://localhost:12345/admin/login" \ -H "Content-Type: application/json" \ - -d '{"password": "FileCodeBox2023"}' + -d '{"password": "<初始化时设置的管理员密码>"}' ``` **响应示例:** @@ -329,4 +329,4 @@ curl -L "http://localhost:12345/share/select/?code=abc123" -o downloaded_file - 403: 禁止访问 - 404: 资源不存在 - 422: 请求参数验证错误 -- 500: 服务器内部错误 \ No newline at end of file +- 500: 服务器内部错误 diff --git a/docs/en/api/index.md b/docs/en/api/index.md index 2addc64..1ec342f 100644 --- a/docs/en/api/index.md +++ b/docs/en/api/index.md @@ -22,7 +22,7 @@ When guest upload is disabled in admin panel (`openUpload=0`), you need to login ```bash curl -X POST "http://localhost:12345/admin/login" \ -H "Content-Type: application/json" \ - -d '{"password": "FileCodeBox2023"}' + -d '{"password": ""}' ``` **Response Example:** @@ -329,4 +329,4 @@ When an error occurs, the API will return corresponding error message: - 403: Forbidden - 404: Not Found - 422: Validation Error -- 500: Internal Server Error \ No newline at end of file +- 500: Internal Server Error diff --git a/docs/en/guide/configuration.md b/docs/en/guide/configuration.md index 89f6be3..db1c0f5 100644 --- a/docs/en/guide/configuration.md +++ b/docs/en/guide/configuration.md @@ -109,11 +109,11 @@ Default available themes: | Setting | Type | Default | Description | |---------|------|---------|-------------| -| `admin_token` | string | `FileCodeBox2023` | Admin login password | +| `admin_token` | string | Set during setup | Admin login password | | `showAdminAddr` | int | `0` | Show admin panel entry on homepage (1=show, 0=hide) | ::: danger Security Warning -Always change the default `admin_token` in production environments! Using the default password poses serious security risks. +The setup page is shown automatically while the system is uninitialized. Complete setup before exposing a production service to the public internet. ::: ## Security Settings diff --git a/docs/en/guide/getting-started.md b/docs/en/guide/getting-started.md index 0cb41c0..c0214e9 100644 --- a/docs/en/guide/getting-started.md +++ b/docs/en/guide/getting-started.md @@ -55,8 +55,9 @@ python main.py - Download file 4. Admin Panel + - Open `http://localhost:12345` on first run and complete setup - Visit `http://localhost:12345/#/admin` - - Enter admin password: `FileCodeBox2023` + - Enter the admin password set during setup - Enter admin panel - View system information, file list, user management, etc. @@ -64,4 +65,4 @@ python main.py - [Storage Configuration](/en/guide/storage) - Learn how to configure different storage methods - [Security Settings](/en/guide/security) - Learn how to enhance system security -- [API Documentation](/en/api/) - Learn how to integrate through API \ No newline at end of file +- [API Documentation](/en/api/) - Learn how to integrate through API diff --git a/docs/en/guide/management.md b/docs/en/guide/management.md index e22a65c..e7cbfb6 100644 --- a/docs/en/guide/management.md +++ b/docs/en/guide/management.md @@ -8,12 +8,13 @@ FileCodeBox provides a fully-featured admin panel that allows administrators to The admin panel is located at the `/admin` path. Access method: -1. Visit `http://your-domain.com/admin` in your browser -2. Enter the admin password (the value of the `admin_token` configuration) -3. Click the login button +1. On first run, set the admin password on the setup page +2. Visit `http://your-domain.com/admin` in your browser +3. Enter the admin password (the value of the `admin_token` configuration) +4. Click the login button ::: tip Tip -The default admin password is `FileCodeBox2023`. Be sure to change this password in production environments. See [Security Settings](/en/guide/security) for details. +The setup page is shown automatically while the system is uninitialized. Complete setup before exposing a production service to the public internet. ::: ### Show Admin Entry diff --git a/docs/en/guide/security.md b/docs/en/guide/security.md index 3c74118..15a082b 100644 --- a/docs/en/guide/security.md +++ b/docs/en/guide/security.md @@ -4,10 +4,10 @@ FileCodeBox provides multiple layers of security mechanisms to protect your file ## Admin Password -### Change Default Password +### First-Run Setup ::: danger Important Security Warning -FileCodeBox's default admin password is `FileCodeBox2023`. **You must change this password immediately in production environments!** Using the default password allows anyone to access your admin panel. +FileCodeBox does not ship with a default admin password. Open the site in your browser on first run and set the admin password on the setup page. ::: There are two ways to change the admin password: @@ -272,7 +272,7 @@ your-domain.com { Before deploying FileCodeBox, confirm the following security configurations: -- [ ] Changed default admin password `admin_token` +- [ ] Completed first-run setup and set the admin password `admin_token` - [ ] Hidden admin entry `showAdminAddr: 0` - [ ] Configured appropriate upload rate limiting - [ ] Configured error rate limiting to prevent brute-force attacks diff --git a/docs/en/guide/upload.md b/docs/en/guide/upload.md index 1dd9306..d8d0f88 100644 --- a/docs/en/guide/upload.md +++ b/docs/en/guide/upload.md @@ -149,7 +149,7 @@ If guest upload is disabled in admin panel (`openUpload=0`), you need to login f # 1. Login to get token curl -X POST "http://localhost:12345/admin/login" \ -H "Content-Type: application/json" \ - -d '{"password": "FileCodeBox2023"}' + -d '{"password": ""}' # Returns: {"code":200,"msg":"success","detail":{"token":"xxx.xxx.xxx","token_type":"Bearer"}} diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md index f32cd51..c4303f0 100644 --- a/docs/guide/configuration.md +++ b/docs/guide/configuration.md @@ -108,11 +108,11 @@ FileCodeBox 支持两种配置方式: | 配置项 | 类型 | 默认值 | 说明 | |--------|------|--------|------| -| `admin_token` | string | `FileCodeBox2023` | 管理员登录密码 | +| `admin_token` | string | 初始化页面设置 | 管理员登录密码(哈希存储) | | `showAdminAddr` | int | `0` | 是否在首页显示管理入口(1=显示,0=隐藏) | ::: danger 安全警告 -请务必在生产环境中修改默认的 `admin_token`!使用默认密码会导致严重的安全风险。 +未初始化时会自动显示初始化页面。生产环境请在服务对外开放前完成初始化。 ::: ## 安全设置 diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index b09d069..1852ed9 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -109,8 +109,9 @@ python main.py - 下载文件 4. 后台管理 + - 首次访问 `http://localhost:12345` 完成初始化 - 访问 `http://localhost:12345/#/admin` - - 输入管理员密码:`FileCodeBox2023` + - 输入初始化时设置的管理员密码 - 进入后台管理页面 - 查看系统信息、文件列表、用户管理等 @@ -118,4 +119,4 @@ python main.py - [存储配置](/guide/storage) - 了解如何配置不同的存储方式 - [安全设置](/guide/security) - 了解如何增强系统安全性 -- [API 文档](/api/) - 了解如何通过 API 集成 \ No newline at end of file +- [API 文档](/api/) - 了解如何通过 API 集成 diff --git a/docs/guide/management.md b/docs/guide/management.md index 933fa4c..c9a4559 100644 --- a/docs/guide/management.md +++ b/docs/guide/management.md @@ -8,12 +8,13 @@ FileCodeBox 提供了功能完善的管理面板,让管理员可以方便地 管理面板位于 `/admin` 路径。访问方式: -1. 在浏览器中访问 `http://your-domain.com/admin` -2. 输入管理员密码(`admin_token` 配置项的值) -3. 点击登录按钮 +1. 首次访问站点时,按初始化页面设置管理员密码 +2. 在浏览器中访问 `http://your-domain.com/admin` +3. 输入管理员密码(`admin_token` 配置项的值) +4. 点击登录按钮 ::: tip 提示 -默认管理员密码是 `FileCodeBox2023`。请务必在生产环境中修改此密码,详见 [安全设置](/guide/security)。 +未初始化时会自动进入初始化页面。生产环境请先完成初始化,再开放公网访问。 ::: ### 显示管理入口 @@ -384,7 +385,7 @@ Content-Type: application/json -- 查看当前配置 SELECT * FROM keyvalue WHERE key = 'settings'; --- 或者删除配置,恢复默认密码 +-- 或者删除配置,重启后重新进入初始化流程 DELETE FROM keyvalue WHERE key = 'settings'; ``` diff --git a/docs/guide/security.md b/docs/guide/security.md index d12c23f..5fa2dd3 100644 --- a/docs/guide/security.md +++ b/docs/guide/security.md @@ -4,10 +4,10 @@ FileCodeBox 提供了多层安全机制来保护您的文件分享服务。本 ## 管理员密码 -### 修改默认密码 +### 首次初始化 ::: danger 重要安全警告 -FileCodeBox 的默认管理员密码是 `FileCodeBox2023`。**在生产环境中必须立即修改此密码!**使用默认密码会导致任何人都可以访问您的管理面板。 +FileCodeBox 首次启动时不会生成默认管理员密码。请在浏览器中打开站点,按初始化页面设置管理员密码,并妥善保存。 ::: 修改管理员密码有两种方式: @@ -271,7 +271,7 @@ your-domain.com { 部署 FileCodeBox 前,请确认以下安全配置: -- [ ] 已修改默认管理员密码 `admin_token` +- [ ] 已完成首次初始化并设置管理员密码 `admin_token` - [ ] 已隐藏管理入口 `showAdminAddr: 0` - [ ] 已配置合适的上传频率限制 - [ ] 已配置错误次数限制防止暴力破解 diff --git a/docs/guide/upload.md b/docs/guide/upload.md index a5f1b8f..95a1197 100644 --- a/docs/guide/upload.md +++ b/docs/guide/upload.md @@ -149,7 +149,7 @@ curl -L "http://localhost:12345/share/select/?code=取件码" -o downloaded_file # 1. 登录获取 token curl -X POST "http://localhost:12345/admin/login" \ -H "Content-Type: application/json" \ - -d '{"password": "FileCodeBox2023"}' + -d '{"password": "<初始化时设置的管理员密码>"}' # 返回: {"code":200,"msg":"success","detail":{"token":"xxx.xxx.xxx","token_type":"Bearer"}} diff --git a/main.py b/main.py index 7b69a20..a6ff0f7 100644 --- a/main.py +++ b/main.py @@ -3,12 +3,14 @@ # @File : main.py # @Software: PyCharm import asyncio +import html import time from contextlib import asynccontextmanager +from urllib.parse import parse_qs -from fastapi import FastAPI, HTTPException +from fastapi import FastAPI, HTTPException, Request from fastapi.middleware.cors import CORSMiddleware -from fastapi.responses import FileResponse, HTMLResponse +from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, RedirectResponse from tortoise import Tortoise from tortoise.contrib.fastapi import register_tortoise @@ -16,13 +18,18 @@ from apps.admin.views import admin_api from apps.base.models import KeyValue from apps.base.utils import ip_limit from apps.base.views import share_api, chunk_api, presign_api -from core.config import ensure_settings_row, refresh_settings +from core.config import ( + ensure_security_settings, + ensure_settings_row, + initialize_system, + is_runtime_initialized, + refresh_settings, +) from core.database import db_startup_lock, get_db_config, init_db from core.logger import logger from core.response import APIResponse from core.settings import settings, BASE_DIR, DEFAULT_CONFIG from core.tasks import delete_expire_files, clean_incomplete_uploads -from core.utils import hash_password, is_password_hashed from core.version import APP_VERSION @@ -67,6 +74,617 @@ def build_public_meta() -> dict: } +FILE_SIZE_UNITS = {"KB": 1024, "MB": 1024**2, "GB": 1024**3} +SAVE_TIME_UNITS = {"second": 1, "minute": 60, "hour": 3600, "day": 86400} +EXPIRE_STYLE_OPTIONS = [ + ("day", "按天"), + ("hour", "按小时"), + ("minute", "按分钟"), + ("forever", "永久"), + ("count", "按取件次数"), +] + + +def get_form_value(data: dict, key: str, default: str = "") -> str: + value = data.get(key, default) + if isinstance(value, list): + value = value[-1] if value else default + return str(value if value is not None else default) + + +def get_form_list(data: dict, key: str) -> list[str]: + value = data.get(key, []) + if isinstance(value, list): + return [str(item) for item in value if str(item)] + if value: + return [str(value)] + return [] + + +def normalize_bool_field(data: dict, key: str, default: bool) -> bool: + if key not in data: + return default + return get_form_value(data, key).lower() in {"1", "true", "on", "yes"} + + +def parse_int_field( + data: dict, + key: str, + default: int, + label: str, + min_value: int = 0, + max_value: int | None = None, +) -> int: + raw_value = get_form_value(data, key, str(default)).strip() + try: + value = int(raw_value) + except ValueError: + raise ValueError(f"{label} 必须是整数") + if value < min_value: + raise ValueError(f"{label} 不能小于 {min_value}") + if max_value is not None and value > max_value: + raise ValueError(f"{label} 不能大于 {max_value}") + return value + + +def parse_allowed_file_types(value: str) -> list[str]: + items = [item.strip() for item in value.split(",") if item.strip()] + return items or ["*"] + + +def parse_setup_options(data: dict) -> dict: + upload_size_unit = get_form_value(data, "upload_size_unit", "MB").upper() + if upload_size_unit not in FILE_SIZE_UNITS: + raise ValueError("文件大小单位不正确") + upload_size_value = parse_int_field( + data, "upload_size_value", 10, "文件大小限制", min_value=1 + ) + + save_time_unit = get_form_value(data, "save_time_unit", "day") + if save_time_unit not in SAVE_TIME_UNITS: + raise ValueError("最长保存时间单位不正确") + save_time_value = parse_int_field( + data, "save_time_value", 0, "最长保存时间", min_value=0 + ) + + expire_styles = get_form_list(data, "expireStyle") + valid_expire_styles = {style for style, _label in EXPIRE_STYLE_OPTIONS} + expire_styles = [style for style in expire_styles if style in valid_expire_styles] + if not expire_styles: + raise ValueError("至少需要选择一种过期方式") + + code_generate_type = get_form_value(data, "code_generate_type", "number") + if code_generate_type not in {"number", "secret"}: + raise ValueError("提取码类型不正确") + + return { + "allowed_file_types": parse_allowed_file_types( + get_form_value(data, "allowed_file_types", "*") + ), + "code_generate_type": code_generate_type, + "enableChunk": int(normalize_bool_field(data, "enableChunk", False)), + "errorCount": parse_int_field( + data, "errorCount", DEFAULT_CONFIG["errorCount"], "取件错误次数限制", 1 + ), + "errorMinute": parse_int_field( + data, "errorMinute", DEFAULT_CONFIG["errorMinute"], "取件错误检测窗口", 1 + ), + "expireStyle": expire_styles, + "max_save_seconds": save_time_value * SAVE_TIME_UNITS[save_time_unit], + "openUpload": int(normalize_bool_field(data, "openUpload", True)), + "uploadCount": parse_int_field( + data, "uploadCount", DEFAULT_CONFIG["uploadCount"], "上传次数限制", 1 + ), + "uploadMinute": parse_int_field( + data, "uploadMinute", DEFAULT_CONFIG["uploadMinute"], "上传检测窗口", 1 + ), + "uploadSize": upload_size_value * FILE_SIZE_UNITS[upload_size_unit], + } + + +def build_expire_style_inputs(selected_styles: list[str]) -> str: + inputs = [] + selected = set(selected_styles) + for style, label in EXPIRE_STYLE_OPTIONS: + checked = " checked" if style in selected else "" + inputs.append( + f'' + ) + return "\n ".join(inputs) + + +def build_setup_page(error: str = "", form: dict | None = None) -> str: + form = form or {} + escaped_error = html.escape(error) + escaped_site_name = html.escape( + get_form_value(form, "site_name", DEFAULT_CONFIG["name"]) + ) + escaped_allowed_types = html.escape(get_form_value(form, "allowed_file_types", "*")) + upload_size_value = html.escape(get_form_value(form, "upload_size_value", "10")) + upload_size_unit = get_form_value(form, "upload_size_unit", "MB").upper() + save_time_value = html.escape(get_form_value(form, "save_time_value", "0")) + save_time_unit = get_form_value(form, "save_time_unit", "day") + upload_minute = html.escape( + get_form_value(form, "uploadMinute", str(DEFAULT_CONFIG["uploadMinute"])) + ) + upload_count = html.escape( + get_form_value(form, "uploadCount", str(DEFAULT_CONFIG["uploadCount"])) + ) + error_minute = html.escape( + get_form_value(form, "errorMinute", str(DEFAULT_CONFIG["errorMinute"])) + ) + error_count = html.escape( + get_form_value(form, "errorCount", str(DEFAULT_CONFIG["errorCount"])) + ) + open_upload_checked = ( + " checked" if normalize_bool_field(form, "openUpload", True) else "" + ) + chunk_checked = ( + " checked" if normalize_bool_field(form, "enableChunk", False) else "" + ) + code_generate_type = get_form_value(form, "code_generate_type", "number") + selected_expire_styles = get_form_list(form, "expireStyle") or list( + DEFAULT_CONFIG["expireStyle"] + ) + expire_style_inputs = build_expire_style_inputs(selected_expire_styles) + size_unit_options = "\n".join( + f'' + for unit in FILE_SIZE_UNITS + ) + save_time_unit_options = "\n".join( + f'' + for unit, label in [ + ("second", "秒"), + ("minute", "分钟"), + ("hour", "小时"), + ("day", "天"), + ] + ) + code_type_options = "\n".join( + f'' + for value, label in [("number", "数字"), ("secret", "随机字符")] + ) + error_block = ( + f'' if escaped_error else "" + ) + return f""" + + + + + 初始化 FileCodeBox + + + +
+
+
+
FCB
+
+

初始化 FileCodeBox

+

首次配置管理员密码、上传限制和取件策略,后续可在后台调整。

+
+
+ 首次配置向导 +
+
+ {error_block} +
+
+
基础设置
+ + + + + + + + +
+ +
+
上传设置
+ +
+ + +
+ + +
+ + +
+ +
+ + + + +
+
+ +
+
取件与保存
+ +
+ + +
+ + +
+ + +
+ + + +
+ +
+
+
可用策略
+ +
+ {expire_style_inputs} +
+
+ +
+ + +
+
+
+ +
+
+ +""" + + +def build_setup_success_page() -> str: + return """ + + + + + + 初始化完成 + + + +
+

初始化完成

+

管理员密码已设置,请使用刚才的密码登录后台。

+ 进入后台 +
+ +""" + + +def setup_response(content: str, status_code: int = 200) -> HTMLResponse: + return HTMLResponse( + content=content, + status_code=status_code, + media_type="text/html", + headers={"Cache-Control": "no-store"}, + ) + + +def is_setup_path(path: str) -> bool: + return path.rstrip("/") == "/setup" + + +def wants_html_response(request: Request) -> bool: + if request.method not in {"GET", "HEAD"}: + return False + accept = request.headers.get("accept", "") + return not accept or "text/html" in accept or "*/*" in accept + + +async def read_setup_payload(request: Request) -> dict: + content_type = request.headers.get("content-type", "") + if "application/json" in content_type: + data = await request.json() + return data if isinstance(data, dict) else {} + + body = (await request.body()).decode("utf-8") + return { + key: values if len(values) > 1 else values[-1] + for key, values in parse_qs(body).items() + } + + @asynccontextmanager async def lifespan(app: FastAPI): logger.info("正在初始化应用...") @@ -99,31 +717,30 @@ async def load_config(): key="sys_start", defaults={"value": int(time.time() * 1000)} ) await refresh_settings() - - await migrate_password_to_hash() + await ensure_security_settings() ip_limit["error"].minutes = settings.errorMinute ip_limit["error"].count = settings.errorCount ip_limit["upload"].minutes = settings.uploadMinute ip_limit["upload"].count = settings.uploadCount - -async def migrate_password_to_hash(): - if not is_password_hashed(settings.admin_token): - hashed = hash_password(settings.admin_token) - settings.admin_token = hashed - config_record = await KeyValue.filter(key="settings").first() - if config_record and config_record.value: - config_record.value["admin_token"] = hashed - await config_record.save() - logger.info("已将管理员密码迁移为哈希存储") - - app = FastAPI(lifespan=lifespan) @app.middleware("http") async def refresh_settings_middleware(request, call_next): await refresh_settings() + if not is_runtime_initialized() and not is_setup_path(request.url.path): + if wants_html_response(request): + return setup_response(build_setup_page()) + return JSONResponse( + status_code=428, + content={ + "code": 428, + "message": "系统未初始化,请先完成初始化", + "msg": "系统未初始化,请先完成初始化", + "detail": {"setup": "/setup"}, + }, + ) return await call_next(request) app.add_middleware( @@ -149,6 +766,43 @@ app.include_router(presign_api, prefix="/api") app.include_router(admin_api) +@app.get("/setup", include_in_schema=False) +@app.get("/setup/", include_in_schema=False) +async def setup_page(): + if is_runtime_initialized(): + return RedirectResponse(url="/", status_code=303) + return setup_response(build_setup_page()) + + +@app.post("/setup", include_in_schema=False) +@app.post("/setup/", include_in_schema=False) +async def setup_submit(request: Request): + if is_runtime_initialized(): + return RedirectResponse(url="/", status_code=303) + + data = await read_setup_payload(request) + admin_password = str(data.get("admin_password") or "") + confirm_password = str(data.get("confirm_password") or "") + site_name = str(data.get("site_name") or "") + + if admin_password != confirm_password: + return setup_response(build_setup_page("两次输入的管理员密码不一致", data), 400) + + try: + setup_options = parse_setup_options(data) + await initialize_system( + admin_password=admin_password, + site_name=site_name, + setup_options=setup_options, + ) + except ValueError as exc: + return setup_response(build_setup_page(str(exc), data), 400) + + if "application/json" in request.headers.get("accept", ""): + return APIResponse(detail={"ok": True, "admin": "/#/admin"}) + return setup_response(build_setup_success_page()) + + def resolve_theme_root(): themes_root = (BASE_DIR / "themes").resolve() theme_root = (BASE_DIR / str(settings.themesSelect)).resolve() diff --git a/readme.md b/readme.md index 63c46e0..b248d67 100644 --- a/readme.md +++ b/readme.md @@ -254,7 +254,7 @@ python main.py |------|------| | **分享文件** | 打开网页 → 选择/拖拽文件 → 设置有效期 → 获取提取码 | | **获取文件** | 打开网页 → 输入提取码 → 下载文件或查看文本 | -| **管理后台** | 访问 `/#/admin` → 输入密码 `FileCodeBox2023` | +| **管理后台** | 首次访问站点完成初始化 → 访问 `/#/admin` → 输入初始化时设置的密码 | ### 命令行使用(curl) @@ -323,7 +323,7 @@ curl -L "http://localhost:12345/share/select/?code=提取码" -o filename # 1. 获取 token curl -X POST "http://localhost:12345/admin/login" \ -H "Content-Type: application/json" \ - -d '{"password": "FileCodeBox2023"}' + -d '{"password": "<初始化时设置的管理员密码>"}' # 2. 携带 token 上传 curl -X POST "http://localhost:12345/share/file/" \ diff --git a/readme_en.md b/readme_en.md index 6448f23..91cb8ed 100644 --- a/readme_en.md +++ b/readme_en.md @@ -254,7 +254,7 @@ python main.py |-----------|-------| | **Share File** | Open website → Select/drag files → Set expiration → Get passcode | | **Retrieve File** | Open website → Enter passcode → Download file or view text | -| **Admin Panel** | Visit `/#/admin` → Enter password `FileCodeBox2023` | +| **Admin Panel** | Complete first-run setup → Visit `/#/admin` → Enter the password set during setup | ### Command Line Usage (curl) @@ -323,7 +323,7 @@ curl -L "http://localhost:12345/share/select/?code=PASSCODE" -o filename # 1. Get token curl -X POST "http://localhost:12345/admin/login" \ -H "Content-Type: application/json" \ - -d '{"password": "FileCodeBox2023"}' + -d '{"password": ""}' # 2. Upload with token curl -X POST "http://localhost:12345/share/file/" \ diff --git a/tests/test_admin_security.py b/tests/test_admin_security.py new file mode 100644 index 0000000..9dee60d --- /dev/null +++ b/tests/test_admin_security.py @@ -0,0 +1,221 @@ +import asyncio +import copy +import unittest + +import apps.admin.services as admin_services +import core.config as core_config +from apps.admin.dependencies import create_token, verify_token +from apps.admin.services import ConfigService +from main import parse_setup_options +from core.security import ( + LEGACY_DEFAULT_ADMIN_TOKEN, + is_config_initialized, + prepare_security_config, +) +from core.settings import DEFAULT_CONFIG, settings +from core.utils import hash_password, verify_password + + +class SettingsOverrideMixin: + def setUp(self): + self._original_user_config = dict(settings.user_config) + + def tearDown(self): + settings.user_config = self._original_user_config + + +class SecurityConfigTests(unittest.TestCase): + def test_initial_security_config_requires_setup_and_generates_jwt_secret(self): + result = prepare_security_config(DEFAULT_CONFIG) + + self.assertTrue(result.changed) + self.assertTrue(result.setup_required) + self.assertEqual(result.config["admin_token"], "") + self.assertFalse(is_config_initialized(result.config)) + self.assertGreaterEqual(len(result.config["jwt_secret"]), 32) + + def test_legacy_default_password_requires_setup(self): + config = copy.deepcopy(DEFAULT_CONFIG) + config["admin_token"] = hash_password(LEGACY_DEFAULT_ADMIN_TOKEN) + config["jwt_secret"] = "j" * 48 + + result = prepare_security_config(config) + + self.assertTrue(result.setup_required) + self.assertEqual(result.config["admin_token"], "") + self.assertEqual(result.config["jwt_secret"], "j" * 48) + + def test_custom_plaintext_password_is_hashed_and_initialized(self): + config = copy.deepcopy(DEFAULT_CONFIG) + config["admin_token"] = "custom-password" + config["jwt_secret"] = "j" * 48 + + result = prepare_security_config(config) + + self.assertTrue(result.password_hashed) + self.assertTrue(is_config_initialized(result.config)) + self.assertTrue(verify_password("custom-password", result.config["admin_token"])) + + +class SetupOptionTests(unittest.TestCase): + def test_parse_setup_options_converts_common_fields(self): + options = parse_setup_options( + { + "upload_size_value": "20", + "upload_size_unit": "MB", + "save_time_value": "7", + "save_time_unit": "day", + "uploadCount": "30", + "uploadMinute": "2", + "errorCount": "5", + "errorMinute": "1", + "openUpload": ["0", "1"], + "enableChunk": "0", + "code_generate_type": "secret", + "expireStyle": ["day", "count"], + "allowed_file_types": ".zip, image/*", + } + ) + + self.assertEqual(options["uploadSize"], 20 * 1024 * 1024) + self.assertEqual(options["max_save_seconds"], 7 * 86400) + self.assertEqual(options["uploadCount"], 30) + self.assertEqual(options["uploadMinute"], 2) + self.assertEqual(options["errorCount"], 5) + self.assertEqual(options["errorMinute"], 1) + self.assertEqual(options["openUpload"], 1) + self.assertEqual(options["enableChunk"], 0) + self.assertEqual(options["code_generate_type"], "secret") + self.assertEqual(options["expireStyle"], ["day", "count"]) + self.assertEqual(options["allowed_file_types"], [".zip", "image/*"]) + + def test_parse_setup_options_allows_turning_guest_upload_off(self): + options = parse_setup_options( + { + "openUpload": "0", + "expireStyle": ["day"], + } + ) + + self.assertEqual(options["openUpload"], 0) + + def test_parse_setup_options_requires_expire_style(self): + with self.assertRaises(ValueError): + parse_setup_options({"expireStyle": []}) + + +class AdminJwtTests(SettingsOverrideMixin, unittest.TestCase): + def test_admin_jwt_signature_uses_independent_secret(self): + settings.admin_token = hash_password("old-admin-password") + settings.jwt_secret = "j" * 48 + + token = create_token({"is_admin": True}, expires_in=60) + self.assertTrue(verify_token(token)["is_admin"]) + + settings.admin_token = hash_password("new-admin-password") + self.assertTrue(verify_token(token)["is_admin"]) + + settings.jwt_secret = "k" * 48 + with self.assertRaises(ValueError): + verify_token(token) + + +class FakeKeyValue: + saved_value = None + + @classmethod + async def update_or_create(cls, key, defaults): + cls.saved_value = defaults["value"] + return None, True + + +async def fake_refresh_settings(): + return None + + +class FakeConfigRecord: + def __init__(self, value): + self.value = value + + +class FakeConfigQuery: + async def first(self): + return FakeConfigKeyValue.record + + +class FakeConfigKeyValue: + record = None + saved_value = None + + @classmethod + def filter(cls, key): + return FakeConfigQuery() + + @classmethod + async def update_or_create(cls, key, defaults): + cls.saved_value = defaults["value"] + return None, True + + +class ConfigServiceSecurityTests(SettingsOverrideMixin, unittest.TestCase): + def test_admin_password_update_rotates_jwt_secret(self): + old_secret = "j" * 48 + settings.user_config = { + **copy.deepcopy(DEFAULT_CONFIG), + "admin_token": hash_password("old-admin-password"), + "jwt_secret": old_secret, + } + original_key_value = admin_services.KeyValue + original_refresh_settings = admin_services.refresh_settings + admin_services.KeyValue = FakeKeyValue + admin_services.refresh_settings = fake_refresh_settings + FakeKeyValue.saved_value = None + try: + asyncio.run(ConfigService().update_config({"admin_token": "new-admin-password"})) + finally: + admin_services.KeyValue = original_key_value + admin_services.refresh_settings = original_refresh_settings + + self.assertIsNotNone(FakeKeyValue.saved_value) + self.assertTrue(verify_password("new-admin-password", FakeKeyValue.saved_value["admin_token"])) + self.assertNotEqual(FakeKeyValue.saved_value["jwt_secret"], old_secret) + self.assertGreaterEqual(len(FakeKeyValue.saved_value["jwt_secret"]), 32) + + def test_initialize_system_sets_admin_password_and_jwt_secret(self): + original_key_value = core_config.KeyValue + original_refresh_settings = core_config.refresh_settings + FakeConfigKeyValue.record = FakeConfigRecord( + { + **copy.deepcopy(DEFAULT_CONFIG), + "admin_token": "", + "jwt_secret": "", + } + ) + FakeConfigKeyValue.saved_value = None + core_config.KeyValue = FakeConfigKeyValue + core_config.refresh_settings = fake_refresh_settings + try: + asyncio.run( + core_config.initialize_system( + admin_password="new-admin-password", + site_name="我的文件快递柜", + setup_options={ + "uploadSize": 50 * 1024 * 1024, + "errorCount": 6, + "expireStyle": ["day", "count"], + }, + ) + ) + finally: + core_config.KeyValue = original_key_value + core_config.refresh_settings = original_refresh_settings + + self.assertIsNotNone(FakeConfigKeyValue.saved_value) + self.assertTrue( + verify_password("new-admin-password", FakeConfigKeyValue.saved_value["admin_token"]) + ) + self.assertGreaterEqual(len(FakeConfigKeyValue.saved_value["jwt_secret"]), 32) + self.assertEqual(FakeConfigKeyValue.saved_value["name"], "我的文件快递柜") + self.assertEqual(FakeConfigKeyValue.saved_value["uploadSize"], 50 * 1024 * 1024) + self.assertEqual(FakeConfigKeyValue.saved_value["errorCount"], 6) + self.assertEqual(FakeConfigKeyValue.saved_value["expireStyle"], ["day", "count"]) diff --git a/tests/test_issue_476_theme_assets.py b/tests/test_issue_476_theme_assets.py index 5041607..56b7275 100644 --- a/tests/test_issue_476_theme_assets.py +++ b/tests/test_issue_476_theme_assets.py @@ -3,7 +3,7 @@ import unittest from fastapi import HTTPException -from core.settings import settings +from core.settings import BASE_DIR, settings from main import index, resolve_theme_file @@ -16,12 +16,21 @@ class SettingsOverrideMixin: class ThemeAssetTests(SettingsOverrideMixin, unittest.TestCase): + def get_theme_index_asset(self, theme: str) -> str: + assets = sorted((BASE_DIR / theme / "assets").glob("index-*.js")) + self.assertTrue(assets, f"{theme} 缺少 index JS 资源") + return assets[0].name + def test_resolves_assets_from_current_theme(self): settings.themesSelect = "themes/2023" - theme_2023_asset = resolve_theme_file("assets", "index-CxMsK_Ni.js") + theme_2023_asset = resolve_theme_file( + "assets", self.get_theme_index_asset("themes/2023") + ) settings.themesSelect = "themes/2024" - theme_2024_asset = resolve_theme_file("assets", "index-DjzJA_Oj.js") + theme_2024_asset = resolve_theme_file( + "assets", self.get_theme_index_asset("themes/2024") + ) self.assertIn("themes/2023/assets", str(theme_2023_asset)) self.assertIn("themes/2024/assets", str(theme_2024_asset)) From 5c72562af7655d46f3c14a86aa23567e3111ea65 Mon Sep 17 00:00:00 2001 From: Lan Date: Tue, 16 Jun 2026 01:35:42 +0800 Subject: [PATCH 10/33] chore: rebuild docker image From 36300ef54ee09081a6cf6a5fe4e69cee7aad0162 Mon Sep 17 00:00:00 2001 From: Lan Date: Sat, 20 Jun 2026 02:41:21 +0800 Subject: [PATCH 11/33] fix: resolve docs dependency audit warnings --- docs/package.json | 9 +- docs/pnpm-lock.yaml | 1359 ++++++++++++++++++++++++------------------- 2 files changed, 759 insertions(+), 609 deletions(-) diff --git a/docs/package.json b/docs/package.json index d4a7f6d..d31914e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,10 +1,15 @@ { "devDependencies": { - "vitepress": "^1.6.3" + "vitepress": "^1.6.4" + }, + "pnpm": { + "overrides": { + "vite": "6.4.3" + } }, "scripts": { "docs:dev": "vitepress dev", "docs:build": "vitepress build", "docs:preview": "vitepress preview" } -} \ No newline at end of file +} diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index 1c4b6eb..29b0297 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -4,16 +4,23 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + vite: 6.4.3 + importers: .: devDependencies: vitepress: - specifier: ^1.6.3 - version: 1.6.3(@algolia/client-search@5.20.2)(postcss@8.5.2)(search-insights@2.17.3) + specifier: ^1.6.4 + version: 1.6.4(@algolia/client-search@5.55.0)(postcss@8.5.15)(search-insights@2.17.3) packages: + '@algolia/abtesting@1.21.0': + resolution: {integrity: sha512-kGvHfBa9oQCvZh0YXeguSToBD9GNJ+gzUZQ9KPTg+KSsM36obYcsKPoX0NnlJtPflHXu7RkMaIi44xs9meR6Zw==} + engines: {node: '>= 14.0.0'} + '@algolia/autocomplete-core@1.17.7': resolution: {integrity: sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q==} @@ -34,73 +41,73 @@ packages: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' - '@algolia/client-abtesting@5.20.2': - resolution: {integrity: sha512-IS8JSFsDD33haaKIIFaL7qj3bEIG9GldZfb3ILW0QF3at7TcrIJYy58hrDvFee5T3p3E2aH/+wqIr0eha8jB/w==} + '@algolia/client-abtesting@5.55.0': + resolution: {integrity: sha512-Zt2GjIm7vsaf7K23tk5JmtcVNc38G9p0C2L2Lrm06miyLE/NL2etHtHInvuLc1DjxTp7Y2nId4X/tzwo372K8Q==} engines: {node: '>= 14.0.0'} - '@algolia/client-analytics@5.20.2': - resolution: {integrity: sha512-k0KxCfcX/HZySqPasKy6GkiiDuebaMh2v/nE0HHg1PbsyeyagLapDi6Ktjkxhz8NlUq6eTJR+ddGJegippKQtQ==} + '@algolia/client-analytics@5.55.0': + resolution: {integrity: sha512-7BueMuWYg/KBA2EX9zsQ+3OAleEyrJcB+SV5Al/9pLjMQq5mXB/8M5HaUPqZwN812g5kLzj9j43VThlZgWq0hg==} engines: {node: '>= 14.0.0'} - '@algolia/client-common@5.20.2': - resolution: {integrity: sha512-xoZcL/Uu49KYDb3feu2n06gALD17p5CslO8Zk3mZ7+uTurK3lgjLws7LNetZ172Ap/GpzPCRXI83d2iDoYQD6Q==} + '@algolia/client-common@5.55.0': + resolution: {integrity: sha512-pJZIyhvUrs+B7c5Lw0iP5yP/NsqJMda7pKRYbfG4KtfGIVSMcAalZhdqL5UX8Z9DOC4KxO9tKV5RDeVjZU0VfQ==} engines: {node: '>= 14.0.0'} - '@algolia/client-insights@5.20.2': - resolution: {integrity: sha512-fy7aCbo9y7WHt/9G03EYc471Dd5kIaM8PNP4z6AEQYr9a9X8c4inwNs6tePxAEfRHwVQi0CZ7kuVdn6/MjWx1A==} + '@algolia/client-insights@5.55.0': + resolution: {integrity: sha512-RydkKDhx0GWTYuw0ndTXHGM8hD8hgwftKE65FfnJZb5bPc9CevOqv3qNPUQiviAwkqT9hQNH31uDGeV3yZkgfA==} engines: {node: '>= 14.0.0'} - '@algolia/client-personalization@5.20.2': - resolution: {integrity: sha512-ocL1ZXulfuXzJAwsKw2kMscKMD0rs/f4CFYu6Gjh4mK4um6rGfa1a6u1MSc4swFqRQer0wNP9Pi+kVfKhuKt5A==} + '@algolia/client-personalization@5.55.0': + resolution: {integrity: sha512-XiS7gdFq/COWiwdWXZ8+RHuewfEo03TkGESk44zU8zTc/Z6R8fm4DNmV52swJKkeB2N9iC7NKpgpM22OOkcgTw==} engines: {node: '>= 14.0.0'} - '@algolia/client-query-suggestions@5.20.2': - resolution: {integrity: sha512-Xjs4Tj1zkLCnmq1ys8RRhLQPy002I6GuT/nbHVdSQmQu4yKCI0gOFbwxHdM6yYPEuE3cJx7A4wSQjCH21mUKsg==} + '@algolia/client-query-suggestions@5.55.0': + resolution: {integrity: sha512-LBEJ/q+hn1nJ0aYg5IcWgLNCPjWHTahWmpHNx1qUZMho+9CyWM6LaEnhac45UHjQm/j0m374HP685VrpL133lA==} engines: {node: '>= 14.0.0'} - '@algolia/client-search@5.20.2': - resolution: {integrity: sha512-2cD3RGB5byusLS0DAX1Nvl5MLiv7OoGgQrRs+94dTalqjvK8lGKzxxJhXoVojgx2qcROyIUAIDXFdTqv6NIHaA==} + '@algolia/client-search@5.55.0': + resolution: {integrity: sha512-2/9jUXKH4IcdU5qxH6cbDH46ZBe46G7xr+MrcHwgEXZcUfdAvUgLSH53MAWuMgxvw0G5yoqiWMifHc62Os0fiQ==} engines: {node: '>= 14.0.0'} - '@algolia/ingestion@1.20.2': - resolution: {integrity: sha512-S593Kmhc98+5zdzGet4GrZEBEBGl4vVtqg/MPfW8dCRf9qDRNYSkhBsIzlhQe9JWiohe9oB9LW5meibwOgRmww==} + '@algolia/ingestion@1.55.0': + resolution: {integrity: sha512-80tKsQgxXWo+jK0v4YGCHqyTEXawhAKYyr3kOdN51ElfRqUFjZNPVhZk6vRiqSqXfvrH85ytacT3cbJR6+qolA==} engines: {node: '>= 14.0.0'} - '@algolia/monitoring@1.20.2': - resolution: {integrity: sha512-bW41aWLYgBv/coJUIT85mkN3kk1VBKsM8tlwB5S/s446Mgc7r8t5TX7kA8kCR2UbwDedOK51i/85/x/rM0ZXbg==} + '@algolia/monitoring@1.55.0': + resolution: {integrity: sha512-4UjmAL8ywGW4rCfK6Qmgw3wIjbrO2wl2s4Eq56JTiN40L2t0XTv0HZkYAmr6nfeiXO0he/2crvZRX6SATSepag==} engines: {node: '>= 14.0.0'} - '@algolia/recommend@5.20.2': - resolution: {integrity: sha512-wBMf3J1L5ogvU8p8ifHkknDXWn1zdZ2epkqpt2MkUaZynE3G77rrFU9frcO+Pu1FQJQ5xCDTKcYUUcJCDD00rg==} + '@algolia/recommend@5.55.0': + resolution: {integrity: sha512-LMpJPtIkfDsHIx5Ga+baNr22ntYbY+e2wT7MSIc/FjAnu9wnBFhx1H/GfhmP/c5/IvbThDX+3ilxPRjSfCI8aA==} engines: {node: '>= 14.0.0'} - '@algolia/requester-browser-xhr@5.20.2': - resolution: {integrity: sha512-w+VMzOkIq2XDGg6Ybzr74RlBZvJQnuIdKpVusQSXCXknvxwAwbO457LmoavhZWl06Lcsk9YDx1X2k0zb+iJQmw==} + '@algolia/requester-browser-xhr@5.55.0': + resolution: {integrity: sha512-tDymJ7nFOAoUuecma3usK6o94dp8m4HYFDGh4ByYQXWkv14cpmDn+nWdylmcZO0Qvco107vqDo4+Anksnl8w1Q==} engines: {node: '>= 14.0.0'} - '@algolia/requester-fetch@5.20.2': - resolution: {integrity: sha512-wpjnbvbi3A13b0DvijE45DRYDvwcP5Ttz7RTMkPWTkF1s6AHuo6O2UcwGyaogMAGa1QOOzFYfp5u4YQwMOQx5g==} + '@algolia/requester-fetch@5.55.0': + resolution: {integrity: sha512-6IDSB5o5dkDPQ4LdOW0Yuw/qy5MdWlO2xDHgPVZgW4YDjbxvnX5PAiV7/WWZdWyVObScZZnnHpPbiqfYs/zBLg==} engines: {node: '>= 14.0.0'} - '@algolia/requester-node-http@5.20.2': - resolution: {integrity: sha512-YuSSdtgUt1dFBTNYUb+2TA5j0Hd0eDXE0bVISjUvTCqmoaGsGLwW+rKI7p1eLQ1r7RESwBAvUwcY1qP2Wl3Lyw==} + '@algolia/requester-node-http@5.55.0': + resolution: {integrity: sha512-Yyyne4l//vDSdg4MhYJkaVne+KEPi833eCj3/T/87ernTwrvP6j9biXXZELsN8sLI/f2ndV/vugDIy2jdJQB6g==} engines: {node: '>= 14.0.0'} - '@babel/helper-string-parser@7.25.9': - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.9': - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} engines: {node: '>=6.9.0'} - '@babel/parser@7.26.8': - resolution: {integrity: sha512-TZIQ25pkSoaKEYYaHbbxkfL36GNsQ6iFiBbeuzAkLnXayKR1yP1zFe+NxuZWWsUyvt8icPU9CCq0sgWGXR1GEw==} + '@babel/parser@7.29.7': + resolution: {integrity: sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/types@7.26.8': - resolution: {integrity: sha512-eUuWapzEGWFEpHFxgEaBG8e3n6S8L3MSu0oda755rOfabWPnh0Our1AozNFVUxGFIhbKgd1ksprsoDGMinTOTA==} + '@babel/types@7.29.7': + resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} engines: {node: '>=6.9.0'} '@docsearch/css@3.8.2': @@ -126,284 +133,335 @@ packages: search-insights: optional: true - '@esbuild/aix-ppc64@0.21.5': - resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} - engines: {node: '>=12'} + '@esbuild/aix-ppc64@0.25.12': + resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} + engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.21.5': - resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} - engines: {node: '>=12'} + '@esbuild/android-arm64@0.25.12': + resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} + engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.21.5': - resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} - engines: {node: '>=12'} + '@esbuild/android-arm@0.25.12': + resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} + engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.21.5': - resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} - engines: {node: '>=12'} + '@esbuild/android-x64@0.25.12': + resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} + engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.21.5': - resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} - engines: {node: '>=12'} + '@esbuild/darwin-arm64@0.25.12': + resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} + engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.21.5': - resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} - engines: {node: '>=12'} + '@esbuild/darwin-x64@0.25.12': + resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} + engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.21.5': - resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} - engines: {node: '>=12'} + '@esbuild/freebsd-arm64@0.25.12': + resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} + engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.21.5': - resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} - engines: {node: '>=12'} + '@esbuild/freebsd-x64@0.25.12': + resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} + engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.21.5': - resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} - engines: {node: '>=12'} + '@esbuild/linux-arm64@0.25.12': + resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} + engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.21.5': - resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} - engines: {node: '>=12'} + '@esbuild/linux-arm@0.25.12': + resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} + engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.21.5': - resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} - engines: {node: '>=12'} + '@esbuild/linux-ia32@0.25.12': + resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} + engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.21.5': - resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} - engines: {node: '>=12'} + '@esbuild/linux-loong64@0.25.12': + resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} + engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.21.5': - resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} - engines: {node: '>=12'} + '@esbuild/linux-mips64el@0.25.12': + resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} + engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.21.5': - resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} - engines: {node: '>=12'} + '@esbuild/linux-ppc64@0.25.12': + resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} + engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.21.5': - resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} - engines: {node: '>=12'} + '@esbuild/linux-riscv64@0.25.12': + resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} + engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.21.5': - resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} - engines: {node: '>=12'} + '@esbuild/linux-s390x@0.25.12': + resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} + engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.21.5': - resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} - engines: {node: '>=12'} + '@esbuild/linux-x64@0.25.12': + resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} + engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.21.5': - resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} - engines: {node: '>=12'} + '@esbuild/netbsd-arm64@0.25.12': + resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.12': + resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} + engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-x64@0.21.5': - resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} - engines: {node: '>=12'} + '@esbuild/openbsd-arm64@0.25.12': + resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.25.12': + resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} + engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.21.5': - resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} - engines: {node: '>=12'} + '@esbuild/openharmony-arm64@0.25.12': + resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.25.12': + resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} + engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.21.5': - resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} - engines: {node: '>=12'} + '@esbuild/win32-arm64@0.25.12': + resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} + engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.21.5': - resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} - engines: {node: '>=12'} + '@esbuild/win32-ia32@0.25.12': + resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} + engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.21.5': - resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} - engines: {node: '>=12'} + '@esbuild/win32-x64@0.25.12': + resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} + engines: {node: '>=18'} cpu: [x64] os: [win32] - '@iconify-json/simple-icons@1.2.24': - resolution: {integrity: sha512-06ZWXZx3PHCE+02zn+iIGOKKNgE3kyPd0Yh7IUEIa0bCYI6UmGlsYYghRx8As9TnTNYMCEiy5V0zI4Jb6EY6XA==} + '@iconify-json/simple-icons@1.2.86': + resolution: {integrity: sha512-t3jck5qPQuK1qy+bRn9eCoDQhIB7XSazKz1Fjp8hcan3XOAsTI5Mq/s3F0ekOKSvMQqkVORYK6ns6o6T9f5EMA==} '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} - '@jridgewell/sourcemap-codec@1.5.0': - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} - '@rollup/rollup-android-arm-eabi@4.34.6': - resolution: {integrity: sha512-+GcCXtOQoWuC7hhX1P00LqjjIiS/iOouHXhMdiDSnq/1DGTox4SpUvO52Xm+div6+106r+TcvOeo/cxvyEyTgg==} + '@rollup/rollup-android-arm-eabi@4.62.2': + resolution: {integrity: sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.34.6': - resolution: {integrity: sha512-E8+2qCIjciYUnCa1AiVF1BkRgqIGW9KzJeesQqVfyRITGQN+dFuoivO0hnro1DjT74wXLRZ7QF8MIbz+luGaJA==} + '@rollup/rollup-android-arm64@4.62.2': + resolution: {integrity: sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.34.6': - resolution: {integrity: sha512-z9Ib+OzqN3DZEjX7PDQMHEhtF+t6Mi2z/ueChQPLS/qUMKY7Ybn5A2ggFoKRNRh1q1T03YTQfBTQCJZiepESAg==} + '@rollup/rollup-darwin-arm64@4.62.2': + resolution: {integrity: sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.34.6': - resolution: {integrity: sha512-PShKVY4u0FDAR7jskyFIYVyHEPCPnIQY8s5OcXkdU8mz3Y7eXDJPdyM/ZWjkYdR2m0izD9HHWA8sGcXn+Qrsyg==} + '@rollup/rollup-darwin-x64@4.62.2': + resolution: {integrity: sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.34.6': - resolution: {integrity: sha512-YSwyOqlDAdKqs0iKuqvRHLN4SrD2TiswfoLfvYXseKbL47ht1grQpq46MSiQAx6rQEN8o8URtpXARCpqabqxGQ==} + '@rollup/rollup-freebsd-arm64@4.62.2': + resolution: {integrity: sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.34.6': - resolution: {integrity: sha512-HEP4CgPAY1RxXwwL5sPFv6BBM3tVeLnshF03HMhJYCNc6kvSqBgTMmsEjb72RkZBAWIqiPUyF1JpEBv5XT9wKQ==} + '@rollup/rollup-freebsd-x64@4.62.2': + resolution: {integrity: sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.34.6': - resolution: {integrity: sha512-88fSzjC5xeH9S2Vg3rPgXJULkHcLYMkh8faix8DX4h4TIAL65ekwuQMA/g2CXq8W+NJC43V6fUpYZNjaX3+IIg==} + '@rollup/rollup-linux-arm-gnueabihf@4.62.2': + resolution: {integrity: sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==} cpu: [arm] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm-musleabihf@4.34.6': - resolution: {integrity: sha512-wM4ztnutBqYFyvNeR7Av+reWI/enK9tDOTKNF+6Kk2Q96k9bwhDDOlnCUNRPvromlVXo04riSliMBs/Z7RteEg==} + '@rollup/rollup-linux-arm-musleabihf@4.62.2': + resolution: {integrity: sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==} cpu: [arm] os: [linux] libc: [musl] - '@rollup/rollup-linux-arm64-gnu@4.34.6': - resolution: {integrity: sha512-9RyprECbRa9zEjXLtvvshhw4CMrRa3K+0wcp3KME0zmBe1ILmvcVHnypZ/aIDXpRyfhSYSuN4EPdCCj5Du8FIA==} + '@rollup/rollup-linux-arm64-gnu@4.62.2': + resolution: {integrity: sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==} cpu: [arm64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.34.6': - resolution: {integrity: sha512-qTmklhCTyaJSB05S+iSovfo++EwnIEZxHkzv5dep4qoszUMX5Ca4WM4zAVUMbfdviLgCSQOu5oU8YoGk1s6M9Q==} + '@rollup/rollup-linux-arm64-musl@4.62.2': + resolution: {integrity: sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==} cpu: [arm64] os: [linux] libc: [musl] - '@rollup/rollup-linux-loongarch64-gnu@4.34.6': - resolution: {integrity: sha512-4Qmkaps9yqmpjY5pvpkfOerYgKNUGzQpFxV6rnS7c/JfYbDSU0y6WpbbredB5cCpLFGJEqYX40WUmxMkwhWCjw==} + '@rollup/rollup-linux-loong64-gnu@4.62.2': + resolution: {integrity: sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==} cpu: [loong64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-powerpc64le-gnu@4.34.6': - resolution: {integrity: sha512-Zsrtux3PuaxuBTX/zHdLaFmcofWGzaWW1scwLU3ZbW/X+hSsFbz9wDIp6XvnT7pzYRl9MezWqEqKy7ssmDEnuQ==} + '@rollup/rollup-linux-loong64-musl@4.62.2': + resolution: {integrity: sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==} + cpu: [loong64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-ppc64-gnu@4.62.2': + resolution: {integrity: sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==} cpu: [ppc64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-riscv64-gnu@4.34.6': - resolution: {integrity: sha512-aK+Zp+CRM55iPrlyKiU3/zyhgzWBxLVrw2mwiQSYJRobCURb781+XstzvA8Gkjg/hbdQFuDw44aUOxVQFycrAg==} + '@rollup/rollup-linux-ppc64-musl@4.62.2': + resolution: {integrity: sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==} + cpu: [ppc64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-riscv64-gnu@4.62.2': + resolution: {integrity: sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==} cpu: [riscv64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-s390x-gnu@4.34.6': - resolution: {integrity: sha512-WoKLVrY9ogmaYPXwTH326+ErlCIgMmsoRSx6bO+l68YgJnlOXhygDYSZe/qbUJCSiCiZAQ+tKm88NcWuUXqOzw==} + '@rollup/rollup-linux-riscv64-musl@4.62.2': + resolution: {integrity: sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-s390x-gnu@4.62.2': + resolution: {integrity: sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==} cpu: [s390x] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.34.6': - resolution: {integrity: sha512-Sht4aFvmA4ToHd2vFzwMFaQCiYm2lDFho5rPcvPBT5pCdC+GwHG6CMch4GQfmWTQ1SwRKS0dhDYb54khSrjDWw==} + '@rollup/rollup-linux-x64-gnu@4.62.2': + resolution: {integrity: sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==} cpu: [x64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.34.6': - resolution: {integrity: sha512-zmmpOQh8vXc2QITsnCiODCDGXFC8LMi64+/oPpPx5qz3pqv0s6x46ps4xoycfUiVZps5PFn1gksZzo4RGTKT+A==} + '@rollup/rollup-linux-x64-musl@4.62.2': + resolution: {integrity: sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==} cpu: [x64] os: [linux] libc: [musl] - '@rollup/rollup-win32-arm64-msvc@4.34.6': - resolution: {integrity: sha512-3/q1qUsO/tLqGBaD4uXsB6coVGB3usxw3qyeVb59aArCgedSF66MPdgRStUd7vbZOsko/CgVaY5fo2vkvPLWiA==} + '@rollup/rollup-openbsd-x64@4.62.2': + resolution: {integrity: sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.62.2': + resolution: {integrity: sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.62.2': + resolution: {integrity: sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.34.6': - resolution: {integrity: sha512-oLHxuyywc6efdKVTxvc0135zPrRdtYVjtVD5GUm55I3ODxhU/PwkQFD97z16Xzxa1Fz0AEe4W/2hzRtd+IfpOA==} + '@rollup/rollup-win32-ia32-msvc@4.62.2': + resolution: {integrity: sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.34.6': - resolution: {integrity: sha512-0PVwmgzZ8+TZ9oGBmdZoQVXflbvuwzN/HRclujpl4N/q3i+y0lqLw8n1bXA8ru3sApDjlmONaNAuYr38y1Kr9w==} + '@rollup/rollup-win32-x64-gnu@4.62.2': + resolution: {integrity: sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==} cpu: [x64] os: [win32] - '@shikijs/core@2.3.2': - resolution: {integrity: sha512-s7vyL3LzUKm3Qwf36zRWlavX9BQMZTIq9B1almM63M5xBuSldnsTHCmsXzoF/Kyw4k7Xgas7yAyJz9VR/vcP1A==} + '@rollup/rollup-win32-x64-msvc@4.62.2': + resolution: {integrity: sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==} + cpu: [x64] + os: [win32] - '@shikijs/engine-javascript@2.3.2': - resolution: {integrity: sha512-w3IEMu5HfL/OaJTsMbIfZ1HRPnWVYRANeDtmsdIIEgUOcLjzFJFQwlnkckGjKHekEzNqlMLbgB/twnfZ/EEAGg==} + '@shikijs/core@2.5.0': + resolution: {integrity: sha512-uu/8RExTKtavlpH7XqnVYBrfBkUc20ngXiX9NSrBhOVZYv/7XQRKUyhtkeflY5QsxC0GbJThCerruZfsUaSldg==} - '@shikijs/engine-oniguruma@2.3.2': - resolution: {integrity: sha512-vikMY1TroyZXUHIXbMnvY/mjtOxMn+tavcfAeQPgWS9FHcgFSUoEtywF5B5sOLb9NXb8P2vb7odkh3nj15/00A==} + '@shikijs/engine-javascript@2.5.0': + resolution: {integrity: sha512-VjnOpnQf8WuCEZtNUdjjwGUbtAVKuZkVQ/5cHy/tojVVRIRtlWMYVjyWhxOmIq05AlSOv72z7hRNRGVBgQOl0w==} - '@shikijs/langs@2.3.2': - resolution: {integrity: sha512-UqI6bSxFzhexIJficZLKeB1L2Sc3xoNiAV0yHpfbg5meck93du+EKQtsGbBv66Ki53XZPhnR/kYkOr85elIuFw==} + '@shikijs/engine-oniguruma@2.5.0': + resolution: {integrity: sha512-pGd1wRATzbo/uatrCIILlAdFVKdxImWJGQ5rFiB5VZi2ve5xj3Ax9jny8QvkaV93btQEwR/rSz5ERFpC5mKNIw==} - '@shikijs/themes@2.3.2': - resolution: {integrity: sha512-QAh7D/hhfYKHibkG2tti8vxNt3ekAH5EqkXJeJbTh7FGvTCWEI7BHqNCtMdjFvZ0vav5nvUgdvA7/HI7pfsB4w==} + '@shikijs/langs@2.5.0': + resolution: {integrity: sha512-Qfrrt5OsNH5R+5tJ/3uYBBZv3SuGmnRPejV9IlIbFH3HTGLDlkqgHymAlzklVmKBjAaVmkPkyikAV/sQ1wSL+w==} - '@shikijs/transformers@2.3.2': - resolution: {integrity: sha512-2HDnJumw8A/9GecRpTgvfqSbPjEbJ4DPWq5J++OVP1gNMLvbV0MqFsP4canqRNM1LqB7VmWY45Stipb0ZIJ+0A==} + '@shikijs/themes@2.5.0': + resolution: {integrity: sha512-wGrk+R8tJnO0VMzmUExHR+QdSaPUl/NKs+a4cQQRWyoc3YFbUzuLEi/KWK1hj+8BfHRKm2jNhhJck1dfstJpiw==} - '@shikijs/types@2.3.2': - resolution: {integrity: sha512-CBaMY+a3pepyC4SETi7+bSzO0f6hxEQJUUuS4uD7zppzjmrN4ZRtBqxaT+wOan26CR9eeJ5iBhc4qvWEwn7Eeg==} + '@shikijs/transformers@2.5.0': + resolution: {integrity: sha512-SI494W5X60CaUwgi8u4q4m4s3YAFSxln3tzNjOSYqq54wlVgz0/NbbXEb3mdLbqMBztcmS7bVTaEd2w0qMmfeg==} - '@shikijs/vscode-textmate@10.0.1': - resolution: {integrity: sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==} + '@shikijs/types@2.5.0': + resolution: {integrity: sha512-ygl5yhxki9ZLNuNpPitBWvcy9fsSKKaRuO4BAlMyagszQidxcpLAr0qiW/q43DtSIDxO6hEbtYLiFZNXO/hdGw==} - '@types/estree@1.0.6': - resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} @@ -423,62 +481,62 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@types/web-bluetooth@0.0.20': - resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} + '@types/web-bluetooth@0.0.21': + resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==} - '@ungap/structured-clone@1.3.0': - resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} + '@ungap/structured-clone@1.3.1': + resolution: {integrity: sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==} - '@vitejs/plugin-vue@5.2.1': - resolution: {integrity: sha512-cxh314tzaWwOLqVes2gnnCtvBDcM1UMdn+iFR+UjAn411dPT3tOmqrJjbMd7koZpMAmBM/GqeV4n9ge7JSiJJQ==} + '@vitejs/plugin-vue@5.2.4': + resolution: {integrity: sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: - vite: ^5.0.0 || ^6.0.0 + vite: 6.4.3 vue: ^3.2.25 - '@vue/compiler-core@3.5.13': - resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} + '@vue/compiler-core@3.5.38': + resolution: {integrity: sha512-s99aGxWYig9ErHbct27KXEGhrBYlRI6c4MwAgXErOAbX9xiW37/uMa+XUDO69zLz83dng8UUZ70CTOJrLrYrEQ==} - '@vue/compiler-dom@3.5.13': - resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} + '@vue/compiler-dom@3.5.38': + resolution: {integrity: sha512-JTqp25l8aFfJYF7/KmsXZjAxJz7T+SjmTJLoXVjHtc2BrSgSiW2n9Aem/cWq1OPe68A8JL06B3eVdhlP0H4TVw==} - '@vue/compiler-sfc@3.5.13': - resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==} + '@vue/compiler-sfc@3.5.38': + resolution: {integrity: sha512-DuA2GiZawSEW442iw/9+Fkol8hTgb4Ke5KkhmSry65QA7YuyMbIdy8p0XZRMvNwJdgRz307W8g1CSzdvS4nuNg==} - '@vue/compiler-ssr@3.5.13': - resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} + '@vue/compiler-ssr@3.5.38': + resolution: {integrity: sha512-7s+W5Gc42FGxZMcuwl8H5B29T8BJPMdBT7KHFE+BbAuZ/iTEdTtv7z2XiMjiaUUw4w3ZcCEdHs36RuYJ2VA7bA==} - '@vue/devtools-api@7.7.1': - resolution: {integrity: sha512-Cexc8GimowoDkJ6eNelOPdYIzsu2mgNyp0scOQ3tiaYSb9iok6LOESSsJvHaI+ib3joRfqRJNLkHFjhNuWA5dg==} + '@vue/devtools-api@7.7.9': + resolution: {integrity: sha512-kIE8wvwlcZ6TJTbNeU2HQNtaxLx3a84aotTITUuL/4bzfPxzajGBOoqjMhwZJ8L9qFYDU/lAYMEEm11dnZOD6g==} - '@vue/devtools-kit@7.7.1': - resolution: {integrity: sha512-yhZ4NPnK/tmxGtLNQxmll90jIIXdb2jAhPF76anvn5M/UkZCiLJy28bYgPIACKZ7FCosyKoaope89/RsFJll1w==} + '@vue/devtools-kit@7.7.9': + resolution: {integrity: sha512-PyQ6odHSgiDVd4hnTP+aDk2X4gl2HmLDfiyEnn3/oV+ckFDuswRs4IbBT7vacMuGdwY/XemxBoh302ctbsptuA==} - '@vue/devtools-shared@7.7.1': - resolution: {integrity: sha512-BtgF7kHq4BHG23Lezc/3W2UhK2ga7a8ohAIAGJMBr4BkxUFzhqntQtCiuL1ijo2ztWnmusymkirgqUrXoQKumA==} + '@vue/devtools-shared@7.7.9': + resolution: {integrity: sha512-iWAb0v2WYf0QWmxCGy0seZNDPdO3Sp5+u78ORnyeonS6MT4PC7VPrryX2BpMJrwlDeaZ6BD4vP4XKjK0SZqaeA==} - '@vue/reactivity@3.5.13': - resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==} + '@vue/reactivity@3.5.38': + resolution: {integrity: sha512-pG6LV/NDNRbKizcUjFFLAfjaL8mcv4DmR9avNcUw2gDHBzZneuS2TWCmp633ynzxz9YYKNeEPK2I8Wraqy2HUQ==} - '@vue/runtime-core@3.5.13': - resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==} + '@vue/runtime-core@3.5.38': + resolution: {integrity: sha512-iyW8WVfF1CpCXxncZY5Ei6rSd6oZr5DgEom//fUjRBRl56AXPD+s9ATvukRt77ZFTuYlnVA1bxY+dJB94tWVYw==} - '@vue/runtime-dom@3.5.13': - resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==} + '@vue/runtime-dom@3.5.38': + resolution: {integrity: sha512-apX2wt9sdfDshS+a2xueFZLVpt0GkRJZSoPmrW/SA4yzXTznhfcMVW59gr7h4YQeY0vJhdJkk2rsIDwgfFgC5A==} - '@vue/server-renderer@3.5.13': - resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==} + '@vue/server-renderer@3.5.38': + resolution: {integrity: sha512-vue8vbf2QlV4quHqzwmJy6dWfmRhP1J8l4wtZg60CL6VoKqcPY2oe7may3+1d9qfpedjK5PRLFqd5k3Isj9mUw==} peerDependencies: - vue: 3.5.13 + vue: 3.5.38 - '@vue/shared@3.5.13': - resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + '@vue/shared@3.5.38': + resolution: {integrity: sha512-FTW0AFZNaK5/mOqvGBwVfUlNLU38TiQn4+DQgIFUnrBBJQ1crMJ82yeGQLV5jyKFsO8yRukpbuP7x+nRbH6aug==} - '@vueuse/core@12.5.0': - resolution: {integrity: sha512-GVyH1iYqNANwcahAx8JBm6awaNgvR/SwZ1fjr10b8l1HIgDp82ngNbfzJUgOgWEoxjL+URAggnlilAEXwCOZtg==} + '@vueuse/core@12.8.2': + resolution: {integrity: sha512-HbvCmZdzAu3VGi/pWYm5Ut+Kd9mn1ZHnn4L5G8kOQTPs/IwIAmJoBrmYk2ckLArgMXZj0AW3n5CAejLUO+PhdQ==} - '@vueuse/integrations@12.5.0': - resolution: {integrity: sha512-HYLt8M6mjUfcoUOzyBcX2RjpfapIwHPBmQJtTmXOQW845Y/Osu9VuTJ5kPvnmWJ6IUa05WpblfOwZ+P0G4iZsQ==} + '@vueuse/integrations@12.8.2': + resolution: {integrity: sha512-fbGYivgK5uBTRt7p5F3zy6VrETlV9RtZjBqd1/HxGdjdckBgBM4ugP8LHpjolqTj14TXTxSK1ZfgPbHYyGuH7g==} peerDependencies: async-validator: ^4 axios: ^1 @@ -518,18 +576,18 @@ packages: universal-cookie: optional: true - '@vueuse/metadata@12.5.0': - resolution: {integrity: sha512-Ui7Lo2a7AxrMAXRF+fAp9QsXuwTeeZ8fIB9wsLHqzq9MQk+2gMYE2IGJW48VMJ8ecvCB3z3GsGLKLbSasQ5Qlg==} + '@vueuse/metadata@12.8.2': + resolution: {integrity: sha512-rAyLGEuoBJ/Il5AmFHiziCPdQzRt88VxR+Y/A/QhJ1EWtWqPBBAxTAFaSkviwEuOEZNtW8pvkPgoCZQ+HxqW1A==} - '@vueuse/shared@12.5.0': - resolution: {integrity: sha512-vMpcL1lStUU6O+kdj6YdHDixh0odjPAUM15uJ9f7MY781jcYkIwFA4iv2EfoIPO6vBmvutI1HxxAwmf0cx5ISQ==} + '@vueuse/shared@12.8.2': + resolution: {integrity: sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w==} - algoliasearch@5.20.2: - resolution: {integrity: sha512-8evxG++iWyWnhng3g5RP+kwn6j+2vKLfew8pVoekn87FcfsDm92zJXKwSrU6pl+m5eAbGFhFF/gCYEQiRdbPlA==} + algoliasearch@5.55.0: + resolution: {integrity: sha512-af+rI+tUVeS9KWHPAZQHIHPOIC3StPRR6IwQu2nz1aQoTL6Gs5Ty3KsHCgbXMHOpoh9QqSjq8F3KJ8xmaCZSBA==} engines: {node: '>= 14.0.0'} - birpc@0.2.19: - resolution: {integrity: sha512-5WeXXAvTmitV1RqJFppT5QtUiz2p1mRSYU000Jkft5ZUCLJIk4uQriYNO50HknxKwM6jd8utNc66K1qGIwwWBQ==} + birpc@2.9.0: + resolution: {integrity: sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==} ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -543,12 +601,12 @@ packages: comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} - copy-anything@3.0.5: - resolution: {integrity: sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==} - engines: {node: '>=12.13'} + copy-anything@4.0.5: + resolution: {integrity: sha512-7Vv6asjS4gMOuILabD3l739tsaxFQmC+a7pLZm02zyvs8p977bL3zEgq3yDk5rn9B0PbYgIv++jmHcuUab4RhA==} + engines: {node: '>=18'} - csstype@3.1.3: - resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} @@ -560,28 +618,37 @@ packages: emoji-regex-xs@1.0.0: resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} - entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + entities@7.0.1: + resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} engines: {node: '>=0.12'} - esbuild@0.21.5: - resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} - engines: {node: '>=12'} + esbuild@0.25.12: + resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} + engines: {node: '>=18'} hasBin: true estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - focus-trap@7.6.4: - resolution: {integrity: sha512-xx560wGBk7seZ6y933idtjJQc1l+ck+pI3sKvhKozdBV1dRZoKhkW5xoCaFv9tQiX5RH1xfSxjuNu6g+lmN/gw==} + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + focus-trap@7.8.0: + resolution: {integrity: sha512-/yNdlIkpWbM0ptxno3ONTuf+2g318kh2ez3KSeZN5dZ8YC6AAmgeWz+GasYYiBJPFaYcSAPeu4GfhUaChzIJXA==} fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - hast-util-to-html@9.0.4: - resolution: {integrity: sha512-wxQzXtdbhiwGAUKrnQJXlOPmHnEehzphwkK7aluUPQ+lEc1xefC8pblMgpp2w5ldBTEfveRIrADcrhGIWrlTDA==} + hast-util-to-html@9.0.5: + resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} hast-util-whitespace@3.0.0: resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} @@ -592,18 +659,18 @@ packages: html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} - is-what@4.1.16: - resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==} - engines: {node: '>=12.13'} + is-what@5.5.0: + resolution: {integrity: sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw==} + engines: {node: '>=18'} - magic-string@0.30.17: - resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} mark.js@8.11.1: resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} - mdast-util-to-hast@13.2.0: - resolution: {integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==} + mdast-util-to-hast@13.2.1: + resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} micromark-util-character@2.1.1: resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} @@ -617,22 +684,22 @@ packages: micromark-util-symbol@2.0.1: resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} - micromark-util-types@2.0.1: - resolution: {integrity: sha512-534m2WhVTddrcKVepwmVEVnUAmtrx9bfIjNoQHRqfnvdaHQiFytEhJoTgpWJvDEXCO5gLTQh3wYC1PgOJA4NSQ==} + micromark-util-types@2.0.2: + resolution: {integrity: sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==} - minisearch@7.1.1: - resolution: {integrity: sha512-b3YZEYCEH4EdCAtYP7OlDyx7FdPwNzuNwLQ34SfJpM9dlbBZzeXndGavTrC+VCiRWomL21SWfMc6SCKO/U2ZNw==} + minisearch@7.2.0: + resolution: {integrity: sha512-dqT2XBYUOZOiC5t2HRnwADjhNS2cecp9u+TJRiJ1Qp/f5qjkeT5APcGPjHw+bz89Ms8Jp+cG4AlE+QZ/QnDglg==} mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} - nanoid@3.3.8: - resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} + nanoid@3.3.13: + resolution: {integrity: sha512-sPdqC6ByMVVGvF1ynvvMo0/o+oD1VX7DaHhijt1bFgjvBkHBib4t49GoNDhf2NDta4oeUNlaGbSt5K7qjZ955Q==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - oniguruma-to-es@3.1.0: - resolution: {integrity: sha512-BJ3Jy22YlgejHSO7Fvmz1kKazlaPmRSUH+4adTDUS/dKQ4wLxI+gALZ8updbaux7/m7fIlpgOZ5fp/Inq5jUAw==} + oniguruma-to-es@3.1.1: + resolution: {integrity: sha512-bUH8SDvPkH3ho3dvwJwfonjlQ4R80vjyvrU8YpxuROddv55vAEJrTuCuCVUhhsHbtlD9tGGbaNApGQckXhS8iQ==} perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} @@ -640,15 +707,19 @@ packages: picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - postcss@8.5.2: - resolution: {integrity: sha512-MjOadfU3Ys9KYoX0AdkBlFEF1Vx37uCCeN4ZHnmwm9FfpbsGWMZeBLMmmpY+6Ocqod7mkdZ0DT31OlbsFrLlkA==} + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} + engines: {node: '>=12'} + + postcss@8.5.15: + resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==} engines: {node: ^10 || ^12 || >=14} - preact@10.25.4: - resolution: {integrity: sha512-jLdZDb+Q+odkHJ+MpW/9U5cODzqnB+fy2EiHSZES7ldV5LK7yjlVzTp7R8Xy6W6y75kfK8iWYtFVH7lvjwrCMA==} + preact@10.29.2: + resolution: {integrity: sha512-7tNmwg/7mzzAoB/8kSg6Hl37JraAZw3Z3A0JSY7VXlZwo82Xn0G7wKbNNs2qoF4ZEEsQGTwDAroNdqKs1ofJxQ==} - property-information@6.5.0: - resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} + property-information@7.2.0: + resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==} regex-recursion@6.0.2: resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==} @@ -656,22 +727,22 @@ packages: regex-utilities@2.3.0: resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} - regex@6.0.1: - resolution: {integrity: sha512-uorlqlzAKjKQZ5P+kTJr3eeJGSVroLKoHmquUj4zHWuR+hEyNqlXsSKlYYF5F4NI6nl7tWCs0apKJ0lmfsXAPA==} + regex@6.1.0: + resolution: {integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==} rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rollup@4.34.6: - resolution: {integrity: sha512-wc2cBWqJgkU3Iz5oztRkQbfVkbxoz5EhnCGOrnJvnLnQ7O0WhQUYyv18qQI79O8L7DdHrrlJNeCHd4VGpnaXKQ==} + rollup@4.62.2: + resolution: {integrity: sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true search-insights@2.17.3: resolution: {integrity: sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==} - shiki@2.3.2: - resolution: {integrity: sha512-UZhz/gsUz7DHFbQBOJP7eXqvKyYvMGramxQiSDc83M/7OkWm6OdVHAReEc3vMLh6L6TRhgL9dvhXz9XDkCDaaw==} + shiki@2.5.0: + resolution: {integrity: sha512-mI//trrsaiCIPsja5CNfsyNOqgAZUb6VpJA+340toL42UpzQlXpwRV9nch69X6gaUxrr9kaOOa6e3y3uAkGFxQ==} source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} @@ -687,18 +758,22 @@ packages: stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} - superjson@2.2.2: - resolution: {integrity: sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==} + superjson@2.2.6: + resolution: {integrity: sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==} engines: {node: '>=16'} - tabbable@6.2.0: - resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} + tabbable@6.4.0: + resolution: {integrity: sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} - unist-util-is@6.0.0: - resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} + unist-util-is@6.0.1: + resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} unist-util-position@5.0.0: resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} @@ -706,34 +781,39 @@ packages: unist-util-stringify-position@4.0.0: resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} - unist-util-visit-parents@6.0.1: - resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} + unist-util-visit-parents@6.0.2: + resolution: {integrity: sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==} - unist-util-visit@5.0.0: - resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} + unist-util-visit@5.1.0: + resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} - vfile-message@4.0.2: - resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} + vfile-message@4.0.3: + resolution: {integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==} vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite@5.4.14: - resolution: {integrity: sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==} - engines: {node: ^18.0.0 || >=20.0.0} + vite@6.4.3: + resolution: {integrity: sha512-NTKlcQjlAK7MlQoyb6LgaqHc8sso/pVyUJYWMws3jg21uTJw/LddqIFPcPqP6PzpgbIcZyKI85sFE4HBrQDA8A==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' less: '*' lightningcss: ^1.21.0 sass: '*' sass-embedded: '*' stylus: '*' sugarss: '*' - terser: ^5.4.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 peerDependenciesMeta: '@types/node': optional: true + jiti: + optional: true less: optional: true lightningcss: @@ -748,9 +828,13 @@ packages: optional: true terser: optional: true + tsx: + optional: true + yaml: + optional: true - vitepress@1.6.3: - resolution: {integrity: sha512-fCkfdOk8yRZT8GD9BFqusW3+GggWYZ/rYncOfmgcDtP3ualNHCAg+Robxp2/6xfH1WwPHtGpPwv7mbA3qomtBw==} + vitepress@1.6.4: + resolution: {integrity: sha512-+2ym1/+0VVrbhNyRoFFesVvBvHAVMZMK0rw60E3X/5349M1GuVdKeazuksqopEdvkKwKGs21Q729jX81/bkBJg==} hasBin: true peerDependencies: markdown-it-mathjax3: ^4 @@ -761,8 +845,8 @@ packages: postcss: optional: true - vue@3.5.13: - resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==} + vue@3.5.38: + resolution: {integrity: sha512-vAMKHfImQlYSy0C+PBue4s3ERZ2xGKfgZg5GXAsLInq1dyh2H78ILVP5sK0KPFPVW4kv+OGCIvBEondcjpZp7A==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -774,130 +858,137 @@ packages: snapshots: - '@algolia/autocomplete-core@1.17.7(@algolia/client-search@5.20.2)(algoliasearch@5.20.2)(search-insights@2.17.3)': + '@algolia/abtesting@1.21.0': dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.17.7(@algolia/client-search@5.20.2)(algoliasearch@5.20.2)(search-insights@2.17.3) - '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.20.2)(algoliasearch@5.20.2) + '@algolia/client-common': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 + + '@algolia/autocomplete-core@1.17.7(@algolia/client-search@5.55.0)(algoliasearch@5.55.0)(search-insights@2.17.3)': + dependencies: + '@algolia/autocomplete-plugin-algolia-insights': 1.17.7(@algolia/client-search@5.55.0)(algoliasearch@5.55.0)(search-insights@2.17.3) + '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.55.0)(algoliasearch@5.55.0) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights - '@algolia/autocomplete-plugin-algolia-insights@1.17.7(@algolia/client-search@5.20.2)(algoliasearch@5.20.2)(search-insights@2.17.3)': + '@algolia/autocomplete-plugin-algolia-insights@1.17.7(@algolia/client-search@5.55.0)(algoliasearch@5.55.0)(search-insights@2.17.3)': dependencies: - '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.20.2)(algoliasearch@5.20.2) + '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.55.0)(algoliasearch@5.55.0) search-insights: 2.17.3 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - '@algolia/autocomplete-preset-algolia@1.17.7(@algolia/client-search@5.20.2)(algoliasearch@5.20.2)': + '@algolia/autocomplete-preset-algolia@1.17.7(@algolia/client-search@5.55.0)(algoliasearch@5.55.0)': dependencies: - '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.20.2)(algoliasearch@5.20.2) - '@algolia/client-search': 5.20.2 - algoliasearch: 5.20.2 + '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.55.0)(algoliasearch@5.55.0) + '@algolia/client-search': 5.55.0 + algoliasearch: 5.55.0 - '@algolia/autocomplete-shared@1.17.7(@algolia/client-search@5.20.2)(algoliasearch@5.20.2)': + '@algolia/autocomplete-shared@1.17.7(@algolia/client-search@5.55.0)(algoliasearch@5.55.0)': dependencies: - '@algolia/client-search': 5.20.2 - algoliasearch: 5.20.2 + '@algolia/client-search': 5.55.0 + algoliasearch: 5.55.0 - '@algolia/client-abtesting@5.20.2': + '@algolia/client-abtesting@5.55.0': dependencies: - '@algolia/client-common': 5.20.2 - '@algolia/requester-browser-xhr': 5.20.2 - '@algolia/requester-fetch': 5.20.2 - '@algolia/requester-node-http': 5.20.2 + '@algolia/client-common': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 - '@algolia/client-analytics@5.20.2': + '@algolia/client-analytics@5.55.0': dependencies: - '@algolia/client-common': 5.20.2 - '@algolia/requester-browser-xhr': 5.20.2 - '@algolia/requester-fetch': 5.20.2 - '@algolia/requester-node-http': 5.20.2 + '@algolia/client-common': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 - '@algolia/client-common@5.20.2': {} + '@algolia/client-common@5.55.0': {} - '@algolia/client-insights@5.20.2': + '@algolia/client-insights@5.55.0': dependencies: - '@algolia/client-common': 5.20.2 - '@algolia/requester-browser-xhr': 5.20.2 - '@algolia/requester-fetch': 5.20.2 - '@algolia/requester-node-http': 5.20.2 + '@algolia/client-common': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 - '@algolia/client-personalization@5.20.2': + '@algolia/client-personalization@5.55.0': dependencies: - '@algolia/client-common': 5.20.2 - '@algolia/requester-browser-xhr': 5.20.2 - '@algolia/requester-fetch': 5.20.2 - '@algolia/requester-node-http': 5.20.2 + '@algolia/client-common': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 - '@algolia/client-query-suggestions@5.20.2': + '@algolia/client-query-suggestions@5.55.0': dependencies: - '@algolia/client-common': 5.20.2 - '@algolia/requester-browser-xhr': 5.20.2 - '@algolia/requester-fetch': 5.20.2 - '@algolia/requester-node-http': 5.20.2 + '@algolia/client-common': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 - '@algolia/client-search@5.20.2': + '@algolia/client-search@5.55.0': dependencies: - '@algolia/client-common': 5.20.2 - '@algolia/requester-browser-xhr': 5.20.2 - '@algolia/requester-fetch': 5.20.2 - '@algolia/requester-node-http': 5.20.2 + '@algolia/client-common': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 - '@algolia/ingestion@1.20.2': + '@algolia/ingestion@1.55.0': dependencies: - '@algolia/client-common': 5.20.2 - '@algolia/requester-browser-xhr': 5.20.2 - '@algolia/requester-fetch': 5.20.2 - '@algolia/requester-node-http': 5.20.2 + '@algolia/client-common': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 - '@algolia/monitoring@1.20.2': + '@algolia/monitoring@1.55.0': dependencies: - '@algolia/client-common': 5.20.2 - '@algolia/requester-browser-xhr': 5.20.2 - '@algolia/requester-fetch': 5.20.2 - '@algolia/requester-node-http': 5.20.2 + '@algolia/client-common': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 - '@algolia/recommend@5.20.2': + '@algolia/recommend@5.55.0': dependencies: - '@algolia/client-common': 5.20.2 - '@algolia/requester-browser-xhr': 5.20.2 - '@algolia/requester-fetch': 5.20.2 - '@algolia/requester-node-http': 5.20.2 + '@algolia/client-common': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 - '@algolia/requester-browser-xhr@5.20.2': + '@algolia/requester-browser-xhr@5.55.0': dependencies: - '@algolia/client-common': 5.20.2 + '@algolia/client-common': 5.55.0 - '@algolia/requester-fetch@5.20.2': + '@algolia/requester-fetch@5.55.0': dependencies: - '@algolia/client-common': 5.20.2 + '@algolia/client-common': 5.55.0 - '@algolia/requester-node-http@5.20.2': + '@algolia/requester-node-http@5.55.0': dependencies: - '@algolia/client-common': 5.20.2 + '@algolia/client-common': 5.55.0 - '@babel/helper-string-parser@7.25.9': {} + '@babel/helper-string-parser@7.29.7': {} - '@babel/helper-validator-identifier@7.25.9': {} + '@babel/helper-validator-identifier@7.29.7': {} - '@babel/parser@7.26.8': + '@babel/parser@7.29.7': dependencies: - '@babel/types': 7.26.8 + '@babel/types': 7.29.7 - '@babel/types@7.26.8': + '@babel/types@7.29.7': dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 '@docsearch/css@3.8.2': {} - '@docsearch/js@3.8.2(@algolia/client-search@5.20.2)(search-insights@2.17.3)': + '@docsearch/js@3.8.2(@algolia/client-search@5.55.0)(search-insights@2.17.3)': dependencies: - '@docsearch/react': 3.8.2(@algolia/client-search@5.20.2)(search-insights@2.17.3) - preact: 10.25.4 + '@docsearch/react': 3.8.2(@algolia/client-search@5.55.0)(search-insights@2.17.3) + preact: 10.29.2 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -905,192 +996,219 @@ snapshots: - react-dom - search-insights - '@docsearch/react@3.8.2(@algolia/client-search@5.20.2)(search-insights@2.17.3)': + '@docsearch/react@3.8.2(@algolia/client-search@5.55.0)(search-insights@2.17.3)': dependencies: - '@algolia/autocomplete-core': 1.17.7(@algolia/client-search@5.20.2)(algoliasearch@5.20.2)(search-insights@2.17.3) - '@algolia/autocomplete-preset-algolia': 1.17.7(@algolia/client-search@5.20.2)(algoliasearch@5.20.2) + '@algolia/autocomplete-core': 1.17.7(@algolia/client-search@5.55.0)(algoliasearch@5.55.0)(search-insights@2.17.3) + '@algolia/autocomplete-preset-algolia': 1.17.7(@algolia/client-search@5.55.0)(algoliasearch@5.55.0) '@docsearch/css': 3.8.2 - algoliasearch: 5.20.2 + algoliasearch: 5.55.0 optionalDependencies: search-insights: 2.17.3 transitivePeerDependencies: - '@algolia/client-search' - '@esbuild/aix-ppc64@0.21.5': + '@esbuild/aix-ppc64@0.25.12': optional: true - '@esbuild/android-arm64@0.21.5': + '@esbuild/android-arm64@0.25.12': optional: true - '@esbuild/android-arm@0.21.5': + '@esbuild/android-arm@0.25.12': optional: true - '@esbuild/android-x64@0.21.5': + '@esbuild/android-x64@0.25.12': optional: true - '@esbuild/darwin-arm64@0.21.5': + '@esbuild/darwin-arm64@0.25.12': optional: true - '@esbuild/darwin-x64@0.21.5': + '@esbuild/darwin-x64@0.25.12': optional: true - '@esbuild/freebsd-arm64@0.21.5': + '@esbuild/freebsd-arm64@0.25.12': optional: true - '@esbuild/freebsd-x64@0.21.5': + '@esbuild/freebsd-x64@0.25.12': optional: true - '@esbuild/linux-arm64@0.21.5': + '@esbuild/linux-arm64@0.25.12': optional: true - '@esbuild/linux-arm@0.21.5': + '@esbuild/linux-arm@0.25.12': optional: true - '@esbuild/linux-ia32@0.21.5': + '@esbuild/linux-ia32@0.25.12': optional: true - '@esbuild/linux-loong64@0.21.5': + '@esbuild/linux-loong64@0.25.12': optional: true - '@esbuild/linux-mips64el@0.21.5': + '@esbuild/linux-mips64el@0.25.12': optional: true - '@esbuild/linux-ppc64@0.21.5': + '@esbuild/linux-ppc64@0.25.12': optional: true - '@esbuild/linux-riscv64@0.21.5': + '@esbuild/linux-riscv64@0.25.12': optional: true - '@esbuild/linux-s390x@0.21.5': + '@esbuild/linux-s390x@0.25.12': optional: true - '@esbuild/linux-x64@0.21.5': + '@esbuild/linux-x64@0.25.12': optional: true - '@esbuild/netbsd-x64@0.21.5': + '@esbuild/netbsd-arm64@0.25.12': optional: true - '@esbuild/openbsd-x64@0.21.5': + '@esbuild/netbsd-x64@0.25.12': optional: true - '@esbuild/sunos-x64@0.21.5': + '@esbuild/openbsd-arm64@0.25.12': optional: true - '@esbuild/win32-arm64@0.21.5': + '@esbuild/openbsd-x64@0.25.12': optional: true - '@esbuild/win32-ia32@0.21.5': + '@esbuild/openharmony-arm64@0.25.12': optional: true - '@esbuild/win32-x64@0.21.5': + '@esbuild/sunos-x64@0.25.12': optional: true - '@iconify-json/simple-icons@1.2.24': + '@esbuild/win32-arm64@0.25.12': + optional: true + + '@esbuild/win32-ia32@0.25.12': + optional: true + + '@esbuild/win32-x64@0.25.12': + optional: true + + '@iconify-json/simple-icons@1.2.86': dependencies: '@iconify/types': 2.0.0 '@iconify/types@2.0.0': {} - '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/sourcemap-codec@1.5.5': {} - '@rollup/rollup-android-arm-eabi@4.34.6': + '@rollup/rollup-android-arm-eabi@4.62.2': optional: true - '@rollup/rollup-android-arm64@4.34.6': + '@rollup/rollup-android-arm64@4.62.2': optional: true - '@rollup/rollup-darwin-arm64@4.34.6': + '@rollup/rollup-darwin-arm64@4.62.2': optional: true - '@rollup/rollup-darwin-x64@4.34.6': + '@rollup/rollup-darwin-x64@4.62.2': optional: true - '@rollup/rollup-freebsd-arm64@4.34.6': + '@rollup/rollup-freebsd-arm64@4.62.2': optional: true - '@rollup/rollup-freebsd-x64@4.34.6': + '@rollup/rollup-freebsd-x64@4.62.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.34.6': + '@rollup/rollup-linux-arm-gnueabihf@4.62.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.34.6': + '@rollup/rollup-linux-arm-musleabihf@4.62.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.34.6': + '@rollup/rollup-linux-arm64-gnu@4.62.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.34.6': + '@rollup/rollup-linux-arm64-musl@4.62.2': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.34.6': + '@rollup/rollup-linux-loong64-gnu@4.62.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.34.6': + '@rollup/rollup-linux-loong64-musl@4.62.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.34.6': + '@rollup/rollup-linux-ppc64-gnu@4.62.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.34.6': + '@rollup/rollup-linux-ppc64-musl@4.62.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.34.6': + '@rollup/rollup-linux-riscv64-gnu@4.62.2': optional: true - '@rollup/rollup-linux-x64-musl@4.34.6': + '@rollup/rollup-linux-riscv64-musl@4.62.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.34.6': + '@rollup/rollup-linux-s390x-gnu@4.62.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.34.6': + '@rollup/rollup-linux-x64-gnu@4.62.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.34.6': + '@rollup/rollup-linux-x64-musl@4.62.2': optional: true - '@shikijs/core@2.3.2': + '@rollup/rollup-openbsd-x64@4.62.2': + optional: true + + '@rollup/rollup-openharmony-arm64@4.62.2': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.62.2': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.62.2': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.62.2': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.62.2': + optional: true + + '@shikijs/core@2.5.0': dependencies: - '@shikijs/engine-javascript': 2.3.2 - '@shikijs/engine-oniguruma': 2.3.2 - '@shikijs/types': 2.3.2 - '@shikijs/vscode-textmate': 10.0.1 + '@shikijs/engine-javascript': 2.5.0 + '@shikijs/engine-oniguruma': 2.5.0 + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 - hast-util-to-html: 9.0.4 + hast-util-to-html: 9.0.5 - '@shikijs/engine-javascript@2.3.2': + '@shikijs/engine-javascript@2.5.0': dependencies: - '@shikijs/types': 2.3.2 - '@shikijs/vscode-textmate': 10.0.1 - oniguruma-to-es: 3.1.0 + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 + oniguruma-to-es: 3.1.1 - '@shikijs/engine-oniguruma@2.3.2': + '@shikijs/engine-oniguruma@2.5.0': dependencies: - '@shikijs/types': 2.3.2 - '@shikijs/vscode-textmate': 10.0.1 + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/langs@2.3.2': + '@shikijs/langs@2.5.0': dependencies: - '@shikijs/types': 2.3.2 + '@shikijs/types': 2.5.0 - '@shikijs/themes@2.3.2': + '@shikijs/themes@2.5.0': dependencies: - '@shikijs/types': 2.3.2 + '@shikijs/types': 2.5.0 - '@shikijs/transformers@2.3.2': + '@shikijs/transformers@2.5.0': dependencies: - '@shikijs/core': 2.3.2 - '@shikijs/types': 2.3.2 + '@shikijs/core': 2.5.0 + '@shikijs/types': 2.5.0 - '@shikijs/types@2.3.2': + '@shikijs/types@2.5.0': dependencies: - '@shikijs/vscode-textmate': 10.0.1 + '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 - '@shikijs/vscode-textmate@10.0.1': {} + '@shikijs/vscode-textmate@10.0.2': {} - '@types/estree@1.0.6': {} + '@types/estree@1.0.9': {} '@types/hast@3.0.4': dependencies: @@ -1111,131 +1229,132 @@ snapshots: '@types/unist@3.0.3': {} - '@types/web-bluetooth@0.0.20': {} + '@types/web-bluetooth@0.0.21': {} - '@ungap/structured-clone@1.3.0': {} + '@ungap/structured-clone@1.3.1': {} - '@vitejs/plugin-vue@5.2.1(vite@5.4.14)(vue@3.5.13)': + '@vitejs/plugin-vue@5.2.4(vite@6.4.3)(vue@3.5.38)': dependencies: - vite: 5.4.14 - vue: 3.5.13 + vite: 6.4.3 + vue: 3.5.38 - '@vue/compiler-core@3.5.13': + '@vue/compiler-core@3.5.38': dependencies: - '@babel/parser': 7.26.8 - '@vue/shared': 3.5.13 - entities: 4.5.0 + '@babel/parser': 7.29.7 + '@vue/shared': 3.5.38 + entities: 7.0.1 estree-walker: 2.0.2 source-map-js: 1.2.1 - '@vue/compiler-dom@3.5.13': + '@vue/compiler-dom@3.5.38': dependencies: - '@vue/compiler-core': 3.5.13 - '@vue/shared': 3.5.13 + '@vue/compiler-core': 3.5.38 + '@vue/shared': 3.5.38 - '@vue/compiler-sfc@3.5.13': + '@vue/compiler-sfc@3.5.38': dependencies: - '@babel/parser': 7.26.8 - '@vue/compiler-core': 3.5.13 - '@vue/compiler-dom': 3.5.13 - '@vue/compiler-ssr': 3.5.13 - '@vue/shared': 3.5.13 + '@babel/parser': 7.29.7 + '@vue/compiler-core': 3.5.38 + '@vue/compiler-dom': 3.5.38 + '@vue/compiler-ssr': 3.5.38 + '@vue/shared': 3.5.38 estree-walker: 2.0.2 - magic-string: 0.30.17 - postcss: 8.5.2 + magic-string: 0.30.21 + postcss: 8.5.15 source-map-js: 1.2.1 - '@vue/compiler-ssr@3.5.13': + '@vue/compiler-ssr@3.5.38': dependencies: - '@vue/compiler-dom': 3.5.13 - '@vue/shared': 3.5.13 + '@vue/compiler-dom': 3.5.38 + '@vue/shared': 3.5.38 - '@vue/devtools-api@7.7.1': + '@vue/devtools-api@7.7.9': dependencies: - '@vue/devtools-kit': 7.7.1 + '@vue/devtools-kit': 7.7.9 - '@vue/devtools-kit@7.7.1': + '@vue/devtools-kit@7.7.9': dependencies: - '@vue/devtools-shared': 7.7.1 - birpc: 0.2.19 + '@vue/devtools-shared': 7.7.9 + birpc: 2.9.0 hookable: 5.5.3 mitt: 3.0.1 perfect-debounce: 1.0.0 speakingurl: 14.0.1 - superjson: 2.2.2 + superjson: 2.2.6 - '@vue/devtools-shared@7.7.1': + '@vue/devtools-shared@7.7.9': dependencies: rfdc: 1.4.1 - '@vue/reactivity@3.5.13': + '@vue/reactivity@3.5.38': dependencies: - '@vue/shared': 3.5.13 + '@vue/shared': 3.5.38 - '@vue/runtime-core@3.5.13': + '@vue/runtime-core@3.5.38': dependencies: - '@vue/reactivity': 3.5.13 - '@vue/shared': 3.5.13 + '@vue/reactivity': 3.5.38 + '@vue/shared': 3.5.38 - '@vue/runtime-dom@3.5.13': + '@vue/runtime-dom@3.5.38': dependencies: - '@vue/reactivity': 3.5.13 - '@vue/runtime-core': 3.5.13 - '@vue/shared': 3.5.13 - csstype: 3.1.3 + '@vue/reactivity': 3.5.38 + '@vue/runtime-core': 3.5.38 + '@vue/shared': 3.5.38 + csstype: 3.2.3 - '@vue/server-renderer@3.5.13(vue@3.5.13)': + '@vue/server-renderer@3.5.38(vue@3.5.38)': dependencies: - '@vue/compiler-ssr': 3.5.13 - '@vue/shared': 3.5.13 - vue: 3.5.13 + '@vue/compiler-ssr': 3.5.38 + '@vue/shared': 3.5.38 + vue: 3.5.38 - '@vue/shared@3.5.13': {} + '@vue/shared@3.5.38': {} - '@vueuse/core@12.5.0': + '@vueuse/core@12.8.2': dependencies: - '@types/web-bluetooth': 0.0.20 - '@vueuse/metadata': 12.5.0 - '@vueuse/shared': 12.5.0 - vue: 3.5.13 + '@types/web-bluetooth': 0.0.21 + '@vueuse/metadata': 12.8.2 + '@vueuse/shared': 12.8.2 + vue: 3.5.38 transitivePeerDependencies: - typescript - '@vueuse/integrations@12.5.0(focus-trap@7.6.4)': + '@vueuse/integrations@12.8.2(focus-trap@7.8.0)': dependencies: - '@vueuse/core': 12.5.0 - '@vueuse/shared': 12.5.0 - vue: 3.5.13 + '@vueuse/core': 12.8.2 + '@vueuse/shared': 12.8.2 + vue: 3.5.38 optionalDependencies: - focus-trap: 7.6.4 + focus-trap: 7.8.0 transitivePeerDependencies: - typescript - '@vueuse/metadata@12.5.0': {} + '@vueuse/metadata@12.8.2': {} - '@vueuse/shared@12.5.0': + '@vueuse/shared@12.8.2': dependencies: - vue: 3.5.13 + vue: 3.5.38 transitivePeerDependencies: - typescript - algoliasearch@5.20.2: + algoliasearch@5.55.0: dependencies: - '@algolia/client-abtesting': 5.20.2 - '@algolia/client-analytics': 5.20.2 - '@algolia/client-common': 5.20.2 - '@algolia/client-insights': 5.20.2 - '@algolia/client-personalization': 5.20.2 - '@algolia/client-query-suggestions': 5.20.2 - '@algolia/client-search': 5.20.2 - '@algolia/ingestion': 1.20.2 - '@algolia/monitoring': 1.20.2 - '@algolia/recommend': 5.20.2 - '@algolia/requester-browser-xhr': 5.20.2 - '@algolia/requester-fetch': 5.20.2 - '@algolia/requester-node-http': 5.20.2 + '@algolia/abtesting': 1.21.0 + '@algolia/client-abtesting': 5.55.0 + '@algolia/client-analytics': 5.55.0 + '@algolia/client-common': 5.55.0 + '@algolia/client-insights': 5.55.0 + '@algolia/client-personalization': 5.55.0 + '@algolia/client-query-suggestions': 5.55.0 + '@algolia/client-search': 5.55.0 + '@algolia/ingestion': 1.55.0 + '@algolia/monitoring': 1.55.0 + '@algolia/recommend': 5.55.0 + '@algolia/requester-browser-xhr': 5.55.0 + '@algolia/requester-fetch': 5.55.0 + '@algolia/requester-node-http': 5.55.0 - birpc@0.2.19: {} + birpc@2.9.0: {} ccount@2.0.1: {} @@ -1245,11 +1364,11 @@ snapshots: comma-separated-tokens@2.0.3: {} - copy-anything@3.0.5: + copy-anything@4.0.5: dependencies: - is-what: 4.1.16 + is-what: 5.5.0 - csstype@3.1.3: {} + csstype@3.2.3: {} dequal@2.0.3: {} @@ -1259,44 +1378,51 @@ snapshots: emoji-regex-xs@1.0.0: {} - entities@4.5.0: {} + entities@7.0.1: {} - esbuild@0.21.5: + esbuild@0.25.12: optionalDependencies: - '@esbuild/aix-ppc64': 0.21.5 - '@esbuild/android-arm': 0.21.5 - '@esbuild/android-arm64': 0.21.5 - '@esbuild/android-x64': 0.21.5 - '@esbuild/darwin-arm64': 0.21.5 - '@esbuild/darwin-x64': 0.21.5 - '@esbuild/freebsd-arm64': 0.21.5 - '@esbuild/freebsd-x64': 0.21.5 - '@esbuild/linux-arm': 0.21.5 - '@esbuild/linux-arm64': 0.21.5 - '@esbuild/linux-ia32': 0.21.5 - '@esbuild/linux-loong64': 0.21.5 - '@esbuild/linux-mips64el': 0.21.5 - '@esbuild/linux-ppc64': 0.21.5 - '@esbuild/linux-riscv64': 0.21.5 - '@esbuild/linux-s390x': 0.21.5 - '@esbuild/linux-x64': 0.21.5 - '@esbuild/netbsd-x64': 0.21.5 - '@esbuild/openbsd-x64': 0.21.5 - '@esbuild/sunos-x64': 0.21.5 - '@esbuild/win32-arm64': 0.21.5 - '@esbuild/win32-ia32': 0.21.5 - '@esbuild/win32-x64': 0.21.5 + '@esbuild/aix-ppc64': 0.25.12 + '@esbuild/android-arm': 0.25.12 + '@esbuild/android-arm64': 0.25.12 + '@esbuild/android-x64': 0.25.12 + '@esbuild/darwin-arm64': 0.25.12 + '@esbuild/darwin-x64': 0.25.12 + '@esbuild/freebsd-arm64': 0.25.12 + '@esbuild/freebsd-x64': 0.25.12 + '@esbuild/linux-arm': 0.25.12 + '@esbuild/linux-arm64': 0.25.12 + '@esbuild/linux-ia32': 0.25.12 + '@esbuild/linux-loong64': 0.25.12 + '@esbuild/linux-mips64el': 0.25.12 + '@esbuild/linux-ppc64': 0.25.12 + '@esbuild/linux-riscv64': 0.25.12 + '@esbuild/linux-s390x': 0.25.12 + '@esbuild/linux-x64': 0.25.12 + '@esbuild/netbsd-arm64': 0.25.12 + '@esbuild/netbsd-x64': 0.25.12 + '@esbuild/openbsd-arm64': 0.25.12 + '@esbuild/openbsd-x64': 0.25.12 + '@esbuild/openharmony-arm64': 0.25.12 + '@esbuild/sunos-x64': 0.25.12 + '@esbuild/win32-arm64': 0.25.12 + '@esbuild/win32-ia32': 0.25.12 + '@esbuild/win32-x64': 0.25.12 estree-walker@2.0.2: {} - focus-trap@7.6.4: + fdir@6.5.0(picomatch@4.0.4): + optionalDependencies: + picomatch: 4.0.4 + + focus-trap@7.8.0: dependencies: - tabbable: 6.2.0 + tabbable: 6.4.0 fsevents@2.3.3: optional: true - hast-util-to-html@9.0.4: + hast-util-to-html@9.0.5: dependencies: '@types/hast': 3.0.4 '@types/unist': 3.0.3 @@ -1304,8 +1430,8 @@ snapshots: comma-separated-tokens: 2.0.3 hast-util-whitespace: 3.0.0 html-void-elements: 3.0.0 - mdast-util-to-hast: 13.2.0 - property-information: 6.5.0 + mdast-util-to-hast: 13.2.1 + property-information: 7.2.0 space-separated-tokens: 2.0.2 stringify-entities: 4.0.4 zwitch: 2.0.4 @@ -1318,30 +1444,30 @@ snapshots: html-void-elements@3.0.0: {} - is-what@4.1.16: {} + is-what@5.5.0: {} - magic-string@0.30.17: + magic-string@0.30.21: dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.5.5 mark.js@8.11.1: {} - mdast-util-to-hast@13.2.0: + mdast-util-to-hast@13.2.1: dependencies: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 - '@ungap/structured-clone': 1.3.0 + '@ungap/structured-clone': 1.3.1 devlop: 1.1.0 micromark-util-sanitize-uri: 2.0.1 trim-lines: 3.0.1 unist-util-position: 5.0.0 - unist-util-visit: 5.0.0 + unist-util-visit: 5.1.0 vfile: 6.0.3 micromark-util-character@2.1.1: dependencies: micromark-util-symbol: 2.0.1 - micromark-util-types: 2.0.1 + micromark-util-types: 2.0.2 micromark-util-encode@2.0.1: {} @@ -1353,33 +1479,35 @@ snapshots: micromark-util-symbol@2.0.1: {} - micromark-util-types@2.0.1: {} + micromark-util-types@2.0.2: {} - minisearch@7.1.1: {} + minisearch@7.2.0: {} mitt@3.0.1: {} - nanoid@3.3.8: {} + nanoid@3.3.13: {} - oniguruma-to-es@3.1.0: + oniguruma-to-es@3.1.1: dependencies: emoji-regex-xs: 1.0.0 - regex: 6.0.1 + regex: 6.1.0 regex-recursion: 6.0.2 perfect-debounce@1.0.0: {} picocolors@1.1.1: {} - postcss@8.5.2: + picomatch@4.0.4: {} + + postcss@8.5.15: dependencies: - nanoid: 3.3.8 + nanoid: 3.3.13 picocolors: 1.1.1 source-map-js: 1.2.1 - preact@10.25.4: {} + preact@10.29.2: {} - property-information@6.5.0: {} + property-information@7.2.0: {} regex-recursion@6.0.2: dependencies: @@ -1387,48 +1515,54 @@ snapshots: regex-utilities@2.3.0: {} - regex@6.0.1: + regex@6.1.0: dependencies: regex-utilities: 2.3.0 rfdc@1.4.1: {} - rollup@4.34.6: + rollup@4.62.2: dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.9 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.34.6 - '@rollup/rollup-android-arm64': 4.34.6 - '@rollup/rollup-darwin-arm64': 4.34.6 - '@rollup/rollup-darwin-x64': 4.34.6 - '@rollup/rollup-freebsd-arm64': 4.34.6 - '@rollup/rollup-freebsd-x64': 4.34.6 - '@rollup/rollup-linux-arm-gnueabihf': 4.34.6 - '@rollup/rollup-linux-arm-musleabihf': 4.34.6 - '@rollup/rollup-linux-arm64-gnu': 4.34.6 - '@rollup/rollup-linux-arm64-musl': 4.34.6 - '@rollup/rollup-linux-loongarch64-gnu': 4.34.6 - '@rollup/rollup-linux-powerpc64le-gnu': 4.34.6 - '@rollup/rollup-linux-riscv64-gnu': 4.34.6 - '@rollup/rollup-linux-s390x-gnu': 4.34.6 - '@rollup/rollup-linux-x64-gnu': 4.34.6 - '@rollup/rollup-linux-x64-musl': 4.34.6 - '@rollup/rollup-win32-arm64-msvc': 4.34.6 - '@rollup/rollup-win32-ia32-msvc': 4.34.6 - '@rollup/rollup-win32-x64-msvc': 4.34.6 + '@rollup/rollup-android-arm-eabi': 4.62.2 + '@rollup/rollup-android-arm64': 4.62.2 + '@rollup/rollup-darwin-arm64': 4.62.2 + '@rollup/rollup-darwin-x64': 4.62.2 + '@rollup/rollup-freebsd-arm64': 4.62.2 + '@rollup/rollup-freebsd-x64': 4.62.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.62.2 + '@rollup/rollup-linux-arm-musleabihf': 4.62.2 + '@rollup/rollup-linux-arm64-gnu': 4.62.2 + '@rollup/rollup-linux-arm64-musl': 4.62.2 + '@rollup/rollup-linux-loong64-gnu': 4.62.2 + '@rollup/rollup-linux-loong64-musl': 4.62.2 + '@rollup/rollup-linux-ppc64-gnu': 4.62.2 + '@rollup/rollup-linux-ppc64-musl': 4.62.2 + '@rollup/rollup-linux-riscv64-gnu': 4.62.2 + '@rollup/rollup-linux-riscv64-musl': 4.62.2 + '@rollup/rollup-linux-s390x-gnu': 4.62.2 + '@rollup/rollup-linux-x64-gnu': 4.62.2 + '@rollup/rollup-linux-x64-musl': 4.62.2 + '@rollup/rollup-openbsd-x64': 4.62.2 + '@rollup/rollup-openharmony-arm64': 4.62.2 + '@rollup/rollup-win32-arm64-msvc': 4.62.2 + '@rollup/rollup-win32-ia32-msvc': 4.62.2 + '@rollup/rollup-win32-x64-gnu': 4.62.2 + '@rollup/rollup-win32-x64-msvc': 4.62.2 fsevents: 2.3.3 search-insights@2.17.3: {} - shiki@2.3.2: + shiki@2.5.0: dependencies: - '@shikijs/core': 2.3.2 - '@shikijs/engine-javascript': 2.3.2 - '@shikijs/engine-oniguruma': 2.3.2 - '@shikijs/langs': 2.3.2 - '@shikijs/themes': 2.3.2 - '@shikijs/types': 2.3.2 - '@shikijs/vscode-textmate': 10.0.1 + '@shikijs/core': 2.5.0 + '@shikijs/engine-javascript': 2.5.0 + '@shikijs/engine-oniguruma': 2.5.0 + '@shikijs/langs': 2.5.0 + '@shikijs/themes': 2.5.0 + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 source-map-js@1.2.1: {} @@ -1442,15 +1576,20 @@ snapshots: character-entities-html4: 2.1.0 character-entities-legacy: 3.0.0 - superjson@2.2.2: + superjson@2.2.6: dependencies: - copy-anything: 3.0.5 + copy-anything: 4.0.5 - tabbable@6.2.0: {} + tabbable@6.4.0: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 trim-lines@3.0.1: {} - unist-util-is@6.0.0: + unist-util-is@6.0.1: dependencies: '@types/unist': 3.0.3 @@ -1462,18 +1601,18 @@ snapshots: dependencies: '@types/unist': 3.0.3 - unist-util-visit-parents@6.0.1: + unist-util-visit-parents@6.0.2: dependencies: '@types/unist': 3.0.3 - unist-util-is: 6.0.0 + unist-util-is: 6.0.1 - unist-util-visit@5.0.0: + unist-util-visit@5.1.0: dependencies: '@types/unist': 3.0.3 - unist-util-is: 6.0.0 - unist-util-visit-parents: 6.0.1 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.0.2 - vfile-message@4.0.2: + vfile-message@4.0.3: dependencies: '@types/unist': 3.0.3 unist-util-stringify-position: 4.0.0 @@ -1481,38 +1620,41 @@ snapshots: vfile@6.0.3: dependencies: '@types/unist': 3.0.3 - vfile-message: 4.0.2 + vfile-message: 4.0.3 - vite@5.4.14: + vite@6.4.3: dependencies: - esbuild: 0.21.5 - postcss: 8.5.2 - rollup: 4.34.6 + esbuild: 0.25.12 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + postcss: 8.5.15 + rollup: 4.62.2 + tinyglobby: 0.2.17 optionalDependencies: fsevents: 2.3.3 - vitepress@1.6.3(@algolia/client-search@5.20.2)(postcss@8.5.2)(search-insights@2.17.3): + vitepress@1.6.4(@algolia/client-search@5.55.0)(postcss@8.5.15)(search-insights@2.17.3): dependencies: '@docsearch/css': 3.8.2 - '@docsearch/js': 3.8.2(@algolia/client-search@5.20.2)(search-insights@2.17.3) - '@iconify-json/simple-icons': 1.2.24 - '@shikijs/core': 2.3.2 - '@shikijs/transformers': 2.3.2 - '@shikijs/types': 2.3.2 + '@docsearch/js': 3.8.2(@algolia/client-search@5.55.0)(search-insights@2.17.3) + '@iconify-json/simple-icons': 1.2.86 + '@shikijs/core': 2.5.0 + '@shikijs/transformers': 2.5.0 + '@shikijs/types': 2.5.0 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 5.2.1(vite@5.4.14)(vue@3.5.13) - '@vue/devtools-api': 7.7.1 - '@vue/shared': 3.5.13 - '@vueuse/core': 12.5.0 - '@vueuse/integrations': 12.5.0(focus-trap@7.6.4) - focus-trap: 7.6.4 + '@vitejs/plugin-vue': 5.2.4(vite@6.4.3)(vue@3.5.38) + '@vue/devtools-api': 7.7.9 + '@vue/shared': 3.5.38 + '@vueuse/core': 12.8.2 + '@vueuse/integrations': 12.8.2(focus-trap@7.8.0) + focus-trap: 7.8.0 mark.js: 8.11.1 - minisearch: 7.1.1 - shiki: 2.3.2 - vite: 5.4.14 - vue: 3.5.13 + minisearch: 7.2.0 + shiki: 2.5.0 + vite: 6.4.3 + vue: 3.5.38 optionalDependencies: - postcss: 8.5.2 + postcss: 8.5.15 transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -1523,6 +1665,7 @@ snapshots: - drauu - fuse.js - idb-keyval + - jiti - jwt-decode - less - lightningcss @@ -1537,15 +1680,17 @@ snapshots: - stylus - sugarss - terser + - tsx - typescript - universal-cookie + - yaml - vue@3.5.13: + vue@3.5.38: dependencies: - '@vue/compiler-dom': 3.5.13 - '@vue/compiler-sfc': 3.5.13 - '@vue/runtime-dom': 3.5.13 - '@vue/server-renderer': 3.5.13(vue@3.5.13) - '@vue/shared': 3.5.13 + '@vue/compiler-dom': 3.5.38 + '@vue/compiler-sfc': 3.5.38 + '@vue/runtime-dom': 3.5.38 + '@vue/server-renderer': 3.5.38(vue@3.5.38) + '@vue/shared': 3.5.38 zwitch@2.0.4: {} From 8d7d856c62d73badd0797eb4daec8d2ff10a403a Mon Sep 17 00:00:00 2001 From: Lan Date: Fri, 10 Jul 2026 17:39:53 +0800 Subject: [PATCH 12/33] fix: harden share retrieval and admin visibility (#482, #480) --- apps/base/utils.py | 3 +- apps/base/views.py | 75 +++++++--- core/config.py | 2 + core/settings.py | 2 +- core/tasks.py | 1 + main.py | 18 ++- tests/test_issue_480_admin_address.py | 26 ++++ tests/test_issue_482_share_usage.py | 193 ++++++++++++++++++++++++++ 8 files changed, 296 insertions(+), 24 deletions(-) create mode 100644 tests/test_issue_480_admin_address.py create mode 100644 tests/test_issue_482_share_usage.py diff --git a/apps/base/utils.py b/apps/base/utils.py index 891a383..4d5ec38 100644 --- a/apps/base/utils.py +++ b/apps/base/utils.py @@ -90,7 +90,7 @@ async def get_expire_info( def get_code_generate_type() -> str: - code_generate_type = getattr(settings, "code_generate_type", "number") + code_generate_type = getattr(settings, "code_generate_type", "secret") if code_generate_type in {"secret", "string"}: return "secret" return "number" @@ -127,5 +127,6 @@ async def calculate_file_hash(file: UploadFile, chunk_size=1024 * 1024) -> str: ip_limit = { "error": IPRateLimit(count=settings.errorCount, minutes=settings.errorMinute), + "metadata": IPRateLimit(count=settings.errorCount, minutes=settings.errorMinute), "upload": IPRateLimit(count=settings.uploadCount, minutes=settings.uploadMinute), } diff --git a/apps/base/views.py b/apps/base/views.py index b56e717..3433f57 100644 --- a/apps/base/views.py +++ b/apps/base/views.py @@ -11,6 +11,7 @@ from typing import Optional, Tuple, Union from fastapi import APIRouter, Form, Request, UploadFile, File, Depends, HTTPException from pydantic import BaseModel, ValidationError from starlette import status +from tortoise.expressions import Case, F, Q, When from apps.admin.dependencies import share_required_login from apps.base.models import FileCodes, UploadChunk, PresignUploadSession @@ -29,7 +30,12 @@ from apps.base.utils import ( from core.response import APIResponse from core.settings import settings from core.storage import storages, FileStorageInterface -from core.utils import get_select_token, get_now, sanitize_filename +from core.utils import ( + get_file_url as get_proxy_file_url, + get_select_token, + get_now, + sanitize_filename, +) share_api = APIRouter(prefix="/share", tags=["分享"]) @@ -211,11 +217,25 @@ async def get_code_file_by_code( return True, file_code -async def update_file_usage(file_code: FileCodes) -> None: - file_code.used_count += 1 - if file_code.expired_count > 0: - file_code.expired_count -= 1 - await file_code.save() +async def consume_file_usage(file_code: FileCodes) -> bool: + """原子校验分享状态并记录一次实际领取。""" + now = await get_now() + eligible = ( + Q(expired_count__gt=0) + | Q(expired_count__lt=0, expired_at__gt=now) + | Q(expired_count__lt=0, expired_at=None) + ) + updated = await FileCodes.filter(Q(id=file_code.id) & eligible).update( + expired_count=Case( + When(expired_count__gt=0, then=F("expired_count") - 1), + default=F("expired_count"), + ), + used_count=F("used_count") + 1, + ) + if not updated: + return False + await file_code.refresh_from_db() + return True def build_file_metadata(file_code: FileCodes) -> dict: @@ -242,9 +262,13 @@ async def build_select_detail( file_code: FileCodes, file_storage: FileStorageInterface ) -> dict: metadata = build_file_metadata(file_code) - download_url = ( - None if file_code.text is not None else await file_storage.get_file_url(file_code) - ) + if file_code.text is not None: + download_url = None + elif file_code.expired_count >= 0: + # 有次数限制的文件必须经过下载接口,第三方直链无法阻止重复使用。 + download_url = await get_proxy_file_url(file_code.code) + else: + download_url = await file_storage.get_file_url(file_code) content = file_code.text if file_code.text is not None else None return { **metadata, @@ -255,24 +279,28 @@ async def build_select_detail( @share_api.get("/metadata/") -async def get_file_metadata(code: str, ip: str = Depends(ip_limit["error"])): +async def get_file_metadata(code: str, ip: str = Depends(ip_limit["metadata"])): has, file_code = await get_code_file_by_code(code) if not has: - ip_limit["error"].add_ip(ip) + ip_limit["metadata"].add_ip(ip) return APIResponse(code=404, detail=file_code) assert isinstance(file_code, FileCodes) + ip_limit["metadata"].add_ip(ip) return APIResponse(detail=build_file_metadata(file_code)) @share_api.post("/metadata/") -async def post_file_metadata(data: SelectFileModel, ip: str = Depends(ip_limit["error"])): +async def post_file_metadata( + data: SelectFileModel, ip: str = Depends(ip_limit["metadata"]) +): has, file_code = await get_code_file_by_code(data.code) if not has: - ip_limit["error"].add_ip(ip) + ip_limit["metadata"].add_ip(ip) return APIResponse(code=404, detail=file_code) assert isinstance(file_code, FileCodes) + ip_limit["metadata"].add_ip(ip) return APIResponse(detail=build_file_metadata(file_code)) @@ -285,7 +313,8 @@ async def get_code_file(code: str, ip: str = Depends(ip_limit["error"])): return APIResponse(code=404, detail=file_code) assert isinstance(file_code, FileCodes) - await update_file_usage(file_code) + if not await consume_file_usage(file_code): + return APIResponse(code=404, detail="文件已过期") return await file_storage.get_file_response(file_code) @@ -298,8 +327,16 @@ async def select_file(data: SelectFileModel, ip: str = Depends(ip_limit["error"] return APIResponse(code=404, detail=file_code) assert isinstance(file_code, FileCodes) - await update_file_usage(file_code) - return APIResponse(detail=await build_select_detail(file_code, file_storage)) + detail = await build_select_detail(file_code, file_storage) + download_url = detail.get("download_url") + consumes_on_download = isinstance(download_url, str) and download_url.startswith( + "/share/download?" + ) + if not consumes_on_download and not await consume_file_usage(file_code): + return APIResponse(code=404, detail="文件已过期") + if not consumes_on_download: + detail.update(build_file_metadata(file_code)) + return APIResponse(detail=detail) @share_api.get("/download") @@ -309,10 +346,12 @@ async def download_file(key: str, code: str, ip: str = Depends(ip_limit["error"] if await get_select_token(normalized_code) != key: ip_limit["error"].add_ip(ip) raise HTTPException(status_code=403, detail="下载鉴权失败") - has, file_code = await get_code_file_by_code(normalized_code, False) + has, file_code = await get_code_file_by_code(normalized_code) if not has: - return APIResponse(code=404, detail="文件不存在") + return APIResponse(code=404, detail=file_code) assert isinstance(file_code, FileCodes) + if not await consume_file_usage(file_code): + return APIResponse(code=404, detail="文件已过期") return ( APIResponse(detail=file_code.text) if file_code.text diff --git a/core/config.py b/core/config.py index fdc3e9b..b6745ca 100644 --- a/core/config.py +++ b/core/config.py @@ -64,6 +64,8 @@ async def ensure_security_settings() -> None: def _sync_ip_limits() -> None: ip_limit["error"].minutes = settings.errorMinute ip_limit["error"].count = settings.errorCount + ip_limit["metadata"].minutes = settings.errorMinute + ip_limit["metadata"].count = settings.errorCount ip_limit["upload"].minutes = settings.uploadMinute ip_limit["upload"].count = settings.uploadCount diff --git a/core/settings.py b/core/settings.py index 40d7ba4..614c5d3 100644 --- a/core/settings.py +++ b/core/settings.py @@ -44,7 +44,7 @@ DEFAULT_CONFIG = { "uploadSize": 1024 * 1024 * 10, "allowed_file_types": ["*"], "expireStyle": ["day", "hour", "minute", "forever", "count"], - "code_generate_type": "number", + "code_generate_type": "secret", "uploadMinute": 1, "enableChunk": 0, "webdav_url": "", diff --git a/core/tasks.py b/core/tasks.py index 1347c0d..bc4aa7b 100644 --- a/core/tasks.py +++ b/core/tasks.py @@ -28,6 +28,7 @@ async def delete_expire_files(): if not dirs and not files: os.rmdir(root) await ip_limit["error"].remove_expired_ip() + await ip_limit["metadata"].remove_expired_ip() await ip_limit["upload"].remove_expired_ip() expire_data = await FileCodes.filter( Q(expired_at__lt=await get_now()) | Q(expired_count=0) diff --git a/main.py b/main.py index a6ff0f7..6be8715 100644 --- a/main.py +++ b/main.py @@ -33,6 +33,12 @@ from core.tasks import delete_expire_files, clean_incomplete_uploads from core.version import APP_VERSION +def normalize_public_flag(value) -> int: + if isinstance(value, str): + return int(value.strip().lower() in {"1", "true", "on", "yes"}) + return int(bool(value)) + + def build_public_config() -> dict: return { "name": settings.name, @@ -45,7 +51,7 @@ def build_public_config() -> dict: "openUpload": settings.openUpload, "notify_title": settings.notify_title, "notify_content": settings.notify_content, - "show_admin_address": settings.showAdminAddr, + "show_admin_address": normalize_public_flag(settings.showAdminAddr), "max_save_seconds": settings.max_save_seconds, } @@ -61,7 +67,7 @@ def build_public_meta() -> dict: "features": { "chunkUpload": bool(settings.enableChunk), "guestUpload": bool(settings.openUpload), - "adminAddressVisible": bool(settings.showAdminAddr), + "adminAddressVisible": bool(normalize_public_flag(settings.showAdminAddr)), "expirationModes": settings.expireStyle, }, "limits": { @@ -153,7 +159,9 @@ def parse_setup_options(data: dict) -> dict: if not expire_styles: raise ValueError("至少需要选择一种过期方式") - code_generate_type = get_form_value(data, "code_generate_type", "number") + code_generate_type = get_form_value( + data, "code_generate_type", DEFAULT_CONFIG["code_generate_type"] + ) if code_generate_type not in {"number", "secret"}: raise ValueError("提取码类型不正确") @@ -222,7 +230,9 @@ def build_setup_page(error: str = "", form: dict | None = None) -> str: chunk_checked = ( " checked" if normalize_bool_field(form, "enableChunk", False) else "" ) - code_generate_type = get_form_value(form, "code_generate_type", "number") + code_generate_type = get_form_value( + form, "code_generate_type", DEFAULT_CONFIG["code_generate_type"] + ) selected_expire_styles = get_form_list(form, "expireStyle") or list( DEFAULT_CONFIG["expireStyle"] ) diff --git a/tests/test_issue_480_admin_address.py b/tests/test_issue_480_admin_address.py new file mode 100644 index 0000000..8ff9da5 --- /dev/null +++ b/tests/test_issue_480_admin_address.py @@ -0,0 +1,26 @@ +import unittest + +from core.settings import settings +from main import build_public_config, build_public_meta + + +class AdminAddressPublicConfigTests(unittest.TestCase): + def setUp(self): + self._original_user_config = dict(settings.user_config) + + def tearDown(self): + settings.user_config = self._original_user_config + + def test_admin_address_is_exposed_as_strict_binary_flag(self): + cases = ((0, 0), (1, 1), ("0", 0), ("1", 1)) + + for configured_value, expected_value in cases: + with self.subTest(configured_value=configured_value): + settings.showAdminAddr = configured_value + + public_value = build_public_config()["show_admin_address"] + feature_value = build_public_meta()["features"]["adminAddressVisible"] + + self.assertIs(type(public_value), int) + self.assertEqual(public_value, expected_value) + self.assertIs(feature_value, bool(expected_value)) diff --git a/tests/test_issue_482_share_usage.py b/tests/test_issue_482_share_usage.py new file mode 100644 index 0000000..391ddd7 --- /dev/null +++ b/tests/test_issue_482_share_usage.py @@ -0,0 +1,193 @@ +import asyncio +import datetime +import unittest +from unittest.mock import patch + +from tortoise import Tortoise + +from apps.base.models import FileCodes +from apps.base import views +from core.settings import DEFAULT_CONFIG, settings +from core.utils import get_now, get_select_token +from main import build_setup_page, parse_setup_options + + +class FakeStorage: + direct_url_calls = 0 + + async def get_file_url(self, file_code): + self.direct_url_calls += 1 + return "https://storage.example/reusable-url" + + async def get_file_response(self, file_code): + return {"downloaded": file_code.code} + + +class FakeRateLimit: + def __init__(self): + self.seen_ips = [] + + def add_ip(self, ip): + self.seen_ips.append(ip) + + +class ShareUsageSecurityTests(unittest.TestCase): + def test_new_installations_default_to_secret_codes(self): + self.assertEqual(DEFAULT_CONFIG["code_generate_type"], "secret") + self.assertEqual( + parse_setup_options({"expireStyle": ["day"]})["code_generate_type"], + "secret", + ) + self.assertIn('