Skip to content

fix: handle non-ASCII owner_name and owner_email in Langflow ingestion metadata #1858

Description

@coderabbitai

Summary

During review of PR #1857 (fix: fix ingestion without page number), it was identified that ingestion may fail when owner_name or owner_email contains non-ASCII characters (e.g., accented letters, CJK characters, Greek characters, etc.).

Problem

owner_name and owner_email are passed via X-Langflow-Global-Var-* HTTP headers in src/services/langflow_file_service.py. HTTP headers must comply with RFC 7230 (ISO-8859-1 / ASCII), so passing non-ASCII values directly without encoding will cause encoding errors or silently corrupt the data.

Example values that would currently break:

owner_name = "José Łukasz 山田"
owner_email = "δοκιμή@παράδειγμα.δοκιμή"

Expected Behaviour

Non-ASCII owner_name and owner_email values should be safely encoded (e.g., percent-encoded or base64-encoded) when passed through HTTP headers, and correctly decoded on the receiving end, so ingestion proceeds without errors and the metadata is preserved faithfully.

Suggested Fix

  • Encode owner_name and owner_email using a UTF-8-safe mechanism (e.g., urllib.parse.quote or RFC 5987 encoding) when setting the X-Langflow-Global-Var-* headers in src/services/langflow_file_service.py.
  • Add a corresponding test verifying ingestion succeeds and metadata is preserved for non-ASCII owner names and emails.

References

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions