-
Notifications
You must be signed in to change notification settings - Fork 7.2k
fix: encoding of image URL #8964
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
Conversation
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bc77bdd0c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddd46d8f99
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if !is_base64 { | ||
| return Err(ImageProcessingError::DataUrl { | ||
| message: "data URL is not base64 encoded".to_string(), | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accept non-base64 data URLs for inline images
This change rejects any data: URL that doesn’t include the ;base64 marker, even though RFC 2397 allows URL‑encoded payloads (e.g., data:image/svg+xml,<svg…>). In ResponseInputItem::from, a decode failure is converted into a text placeholder, so these valid inline images are silently dropped instead of being sent downstream. This is a regression from the prior behavior that passed such URLs through as-is; users providing non‑base64 data URLs will now lose their image.
Useful? React with 👍 / 👎.
No description provided.