mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-04-05 19:58:09 +08:00
File reading fixes
File reading fixes
This commit is contained in:
@@ -348,7 +348,7 @@ def plugin_static_file(plugin_id: str, filepath: str):
|
||||
获取插件静态文件
|
||||
"""
|
||||
# 基础安全检查
|
||||
if ".." in plugin_id or ".." in filepath:
|
||||
if ".." in filepath or ".." in plugin_id:
|
||||
logger.warning(f"Static File API: Path traversal attempt detected: {plugin_id}/{filepath}")
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="Forbidden")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user