-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
16.0 - Migration mail_embed_image #1402
base: 16.0
Are you sure you want to change the base?
Conversation
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.
not an expert but LGTM
).decode("utf-8") | ||
image_content = response.content | ||
filepart = MIMEImage(image_content) | ||
filepart.add_header("Content-ID", f"<{cid}>") |
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.
ask : shall not be the cid.encode("utf-8") ?
b7b8a38
to
8fcc1b9
Compare
This PR has the |
src = img.get("src") | ||
if src and not src.startswith("data:") and not src.startswith("base64:"): | ||
try: | ||
response = requests.get(src, timeout=10) |
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.
the reason the original did the fetching in a somewhat roundabout way is that what you do here allows malicious users to craft emails to themselves and have Odoo fetch arbitrary resources from the internal network. Can be harmless, can be catastrophic depending on what's accessible from there
No description provided.