Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core[patch]: update image util err msg #27803

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion libs/core/langchain_core/utils/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

def __getattr__(name: str) -> Any:
if name in ("encode_image", "image_to_data_url"):
msg = f"'{name}' has been removed for security reasons."
msg = (
f"'{name}' has been removed for security reasons.\n\n"
f"Usage of this utility in environments with user-input paths is a "
f"security vulnerability. Out of an abundance of caution, the utility "
f"has been removed to prevent possible misuse."
)
raise ValueError(msg)
raise AttributeError(name)
Loading