Skip to content

Commit 30713d5

Browse files
authored
Merge branch 'main' into dependabot/pip/EdgeCraftRAG/edgecraftrag/llama-index-0.13.0
2 parents c2674f8 + aef896b commit 30713d5

5 files changed

Lines changed: 12 additions & 5 deletions

File tree

ChatQnA/ui/svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@fortawesome/free-solid-svg-icons": "6.2.0",
1919
"@playwright/test": "^1.45.2",
2020
"@sveltejs/adapter-auto": "^3.0.0",
21-
"@sveltejs/kit": "2.0.0",
21+
"@sveltejs/kit": "2.20.6",
2222
"@sveltejs/vite-plugin-svelte": "^3.0.0",
2323
"@tailwindcss/typography": "0.5.7",
2424
"@types/debug": "4.1.7",

CodeTrans/ui/svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"devDependencies": {
1717
"@playwright/test": "^1.44.1",
1818
"@sveltejs/adapter-auto": "^3.0.0",
19-
"@sveltejs/kit": "2.0.0",
19+
"@sveltejs/kit": "2.20.6",
2020
"@sveltejs/package": "^2.0.0",
2121
"@sveltejs/vite-plugin-svelte": "^3.0.0",
2222
"@types/prismjs": "^1.26.3",

EdgeCraftRAG/edgecraftrag/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ EbookLib>=0.18
33
faiss-cpu>=1.8.0.post1
44
html2text>=2025.4.15
55
json-repair==0.52.0
6-
langchain-core==0.3.79
6+
langchain-core==0.3.80
77
langchain-milvus
88
langchain-openai
99
langgraph==0.6.10

EdgeCraftRAG/edgecraftrag/utils.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@ def get_prompt_template(model_path, prompt_content=None, template_path=None, ena
4545
if prompt_content is not None:
4646
template = prompt_content
4747
elif template_path is not None:
48-
template = Path(template_path).read_text(encoding=None)
48+
# Safely load the template only if it is inside /templates (or other safe root)
49+
safe_root = "/templates"
50+
normalized_path = os.path.normpath(os.path.join(safe_root, template_path))
51+
if not normalized_path.startswith(safe_root):
52+
raise ValueError("Template path is outside of the allowed directory.")
53+
if not os.path.exists(normalized_path):
54+
raise FileNotFoundError("Template file does not exist.")
55+
template = Path(normalized_path).read_text(encoding=None)
4956
else:
5057
template = DEFAULT_TEMPLATE
5158
tokenizer = AutoTokenizer.from_pretrained(model_path)

PolyLingua/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"react": "^18.3.1",
1313
"react-dom": "^18.3.1",
14-
"next": "14.2.32",
14+
"next": "14.2.35",
1515
"@radix-ui/react-label": "^2.0.2",
1616
"@radix-ui/react-select": "^2.0.0",
1717
"@radix-ui/react-slot": "^1.0.2",

0 commit comments

Comments
 (0)