+
Skip to content

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Nov 3, 2024

This change adds support for receiving
Autocrypt header in the protected part of encrypted message.

Autocrypt header is now also allowed in mailing lists.
Previously Autocrypt header was rejected when
List-Post header was present,
but the check for the address being equal to the From: address
is sufficient.

New experimental protect_autocrypt config is disabled
by default because Delta Chat with reception
support should be released first on all platforms.

Closes #6171

@link2xt link2xt force-pushed the link2xt/accept-protected-autocrypt branch from e59a970 to f317a5a Compare November 3, 2024 05:56
@link2xt link2xt changed the title Accept protected Autocrypt headers feat: experimental header protection for Autocrypt Nov 3, 2024
@link2xt link2xt force-pushed the link2xt/accept-protected-autocrypt branch from c70f0ed to 08f97a4 Compare November 3, 2024 06:30
@link2xt link2xt marked this pull request as ready for review November 3, 2024 06:30
@link2xt
Copy link
Collaborator Author

link2xt commented Nov 3, 2024

Enabling this by default breaks only 2 Rust tests (which expect to see Autocrypt header in unprotected part) and 1 Python test (which expects that Autocrypt header is visible on undecipherable message so reply is encrypted). So once sufficient number of clients support header protection we can easily enable it for Autocrypt.

@link2xt link2xt force-pushed the link2xt/accept-protected-autocrypt branch from 08f97a4 to 60f5387 Compare November 5, 2024 02:02
@link2xt link2xt requested review from Hocuri and iequidoo November 5, 2024 11:35
alice
.set_config_bool(Config::ProtectAutocrypt, true)
.await?;
bob.set_config_bool(Config::ProtectAutocrypt, true).await?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems rustfmt has weird default setting, 67 chars are ok, but 69 are already wrapped. I think at least 80 never need wrapping

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=#chain_width (60 w/o indentation). Also see https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=#use_small_heuristics for other defaults. I'd suggest to set the limit for all statements to 80 chars, that was always fine as far as i remember

Copy link
Collaborator Author

@link2xt link2xt Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing rustfmt settings will break git blame and outstanding PRs, and likely make some other lines look worse than before. These two lines look odd next to each because they are formatted differently, but not worth the trouble of reformatting the whole codebase and tweaking settings.

Just changing chain_width to 100 generated warnings and a diff with "90 files changed, 1640 insertions(+), 4645 deletions(-)".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this isn't an option. Unfortunately there's no option to preserve already existing line breaks :/

This change adds support for receiving
Autocrypt header in the protected part of encrypted message.

Autocrypt header is now also allowed in mailing lists.
Previously Autocrypt header was rejected when
List-Post header was present,
but the check for the address being equal to the From: address
is sufficient.

New experimental `protect_autocrypt` config is disabled
by default because Delta Chat with reception
support should be released first on all platforms.
@link2xt link2xt force-pushed the link2xt/accept-protected-autocrypt branch from 60f5387 to 7055c2d Compare November 6, 2024 22:45
@link2xt link2xt merged commit faad576 into main Nov 6, 2024
37 checks passed
@link2xt link2xt deleted the link2xt/accept-protected-autocrypt branch November 6, 2024 23:16
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.

Support header protection for Autocrypt header

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载