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