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

Option to always allow external images #873

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

mercihabam
Copy link
Member

@mercihabam mercihabam commented Jan 23, 2024

Description

show the list of all external resources in an email and allow the user to approve each one individually or all at once or approve all resources from the sender.

Issues

@mercihabam mercihabam marked this pull request as draft January 23, 2024 15:34
@mercihabam mercihabam changed the title WIP: list all external resources Option to always allow external images Jan 26, 2024
@mercihabam mercihabam force-pushed the external-images branch 3 times, most recently from 79e4e00 to a6d2ff1 Compare January 28, 2024 10:21
@kroky
Copy link
Member

kroky commented Jan 30, 2024

Why do we want to keep the exceptions in a set of cookies? Might be too much information for the cookie storage - imagine people allowing all external resources in many emails one after the other. Instead, can't we do it all in JS on client-side?

E.g. server-side continues to replace src attributes but also adds data-source, so JS code can access the original sources. It can also add the proper allow/allow all links but then JS handlers will actually execute, replace img tags with actual sources and allow the display if user clicks the action buttons/links.

@mercihabam
Copy link
Member Author

Why do we want to keep the exceptions in a set of cookies? Might be too much information for the cookie storage - imagine people allowing all external resources in many emails one after the other. Instead, can't we do it all in JS on client-side?

E.g. server-side continues to replace src attributes but also adds data-source, so JS code can access the original sources. It can also add the proper allow/allow all links but then JS handlers will actually execute, replace img tags with actual sources and allow the display if user clicks the action buttons/links.

What you're suggesting is valid, but then, it would require the user to always perform that action of allowing external images whenever they open the same email and want to visualize images because we are not storing the state anywhere. I think the purpose is to make it easy for the user so they don't repeat the same action always, we are even planning to add another option that will allow the user to always display images from a certain sender.
What do you think @kroky?

@kroky
Copy link
Member

kroky commented Jan 30, 2024

Can we use local storage or session storage much like other cypht code use it in that case?

@mercihabam
Copy link
Member Author

Can we use local storage or session storage much like other cypht code use it in that case?

Ok, let's explore that way.

@mercihabam mercihabam force-pushed the external-images branch 3 times, most recently from 5ecf87b to 83f2203 Compare February 2, 2024 18:15
@mercihabam mercihabam marked this pull request as ready for review February 2, 2024 18:17
@marclaporte marclaporte requested review from kroky and removed request for marclaporte February 16, 2024 15:42
@mercihabam mercihabam force-pushed the external-images branch 2 times, most recently from b13c228 to 463f468 Compare February 20, 2024 08:55
@mercihabam mercihabam requested a review from kroky February 20, 2024 08:56
…he user to approve each one individually or all at once or approve all resources from the sender
@mercihabam mercihabam requested a review from kroky February 21, 2024 15:19
@kroky kroky merged commit ddf1dce into cypht-org:master Feb 22, 2024
@marclaporte marclaporte added this to the 2.0 milestone Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants