Skip to content

Commit 11f2c6d

Browse files
HaystackBotsjrl
andauthored
docs: sync Haystack API reference on Docusaurus (#12109)
Co-authored-by: sjrl <10526848+sjrl@users.noreply.github.com>
1 parent e722281 commit 11f2c6d

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

docs-website/reference/haystack-api/converters_api.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,11 @@ Initialize the DocumentToImageContent component.
455455

456456
- **file_path_meta_field** (<code>str</code>) – The metadata field in the Document that contains the file path to the image or PDF.
457457
- **root_path** (<code>str | None</code>) – The root directory path where document files are located. If provided, file paths in
458-
document metadata will be resolved relative to this path. If None, file paths are treated as absolute paths.
458+
document metadata will be resolved relative to this path and are guaranteed to stay within it. If None,
459+
file paths are treated as absolute paths with no containment check.
460+
Security: this component reads the file referenced by `file_path_meta_field` from the host filesystem. If
461+
document metadata may be influenced by untrusted input, set `root_path` to a dedicated data directory so
462+
that path-traversal payloads (e.g. absolute paths or `../`) are rejected instead of read.
459463
- **detail** (<code>Literal['auto', 'high', 'low'] | None</code>) – Optional detail level of the image (only supported by OpenAI). Can be "auto", "high", or "low".
460464
This will be passed to the created ImageContent objects.
461465
- **size** (<code>tuple\[int, int\] | None</code>) – If provided, resizes the image to fit within the specified dimensions (width, height) while

docs-website/reference/haystack-api/extractors_api.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ Initialize the LLMDocumentContentExtractor component.
104104
- **prompt** (<code>str</code>) – Prompt for extraction. Must not contain Jinja variables.
105105
- **file_path_meta_field** (<code>str</code>) – The metadata field in the Document that contains the file path to the image or PDF.
106106
- **root_path** (<code>str | None</code>) – The root directory path where document files are located. If provided, file paths in
107-
document metadata will be resolved relative to this path. If None, file paths are treated as absolute paths.
107+
document metadata will be resolved relative to this path and are guaranteed to stay within it. If None,
108+
file paths are treated as absolute paths with no containment check.
109+
Security: this component reads the file referenced by `file_path_meta_field` from the host filesystem. If
110+
document metadata may be influenced by untrusted input, set `root_path` to a dedicated data directory so
111+
that path-traversal payloads (e.g. absolute paths or `../`) are rejected instead of read.
108112
- **detail** (<code>Literal['auto', 'high', 'low'] | None</code>) – Optional detail level of the image (only supported by OpenAI). Can be "auto", "high", or "low".
109113
- **size** (<code>tuple\[int, int\] | None</code>) – If provided, resizes the image to fit within (width, height) while keeping aspect ratio.
110114
- **raise_on_failure** (<code>bool</code>) – If True, exceptions from the LLM are raised. If False, failed documents are returned.

docs-website/reference/haystack-api/image_converters_api.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ Initialize the DocumentToImageContent component.
7272

7373
- **file_path_meta_field** (<code>str</code>) – The metadata field in the Document that contains the file path to the image or PDF.
7474
- **root_path** (<code>str | None</code>) – The root directory path where document files are located. If provided, file paths in
75-
document metadata will be resolved relative to this path. If None, file paths are treated as absolute paths.
75+
document metadata will be resolved relative to this path and are guaranteed to stay within it. If None,
76+
file paths are treated as absolute paths with no containment check.
77+
Security: this component reads the file referenced by `file_path_meta_field` from the host filesystem. If
78+
document metadata may be influenced by untrusted input, set `root_path` to a dedicated data directory so
79+
that path-traversal payloads (e.g. absolute paths or `../`) are rejected instead of read.
7680
- **detail** (<code>Literal['auto', 'high', 'low'] | None</code>) – Optional detail level of the image (only supported by OpenAI). Can be "auto", "high", or "low".
7781
This will be passed to the created ImageContent objects.
7882
- **size** (<code>tuple\[int, int\] | None</code>) – If provided, resizes the image to fit within the specified dimensions (width, height) while

0 commit comments

Comments
 (0)