-
-
Notifications
You must be signed in to change notification settings - Fork 110
Implement "Header Protection for Cryptographically Protected Email" #7386
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fc30aa9
feat: Ignore unprotected headers if Content-Type has "hp" parameter (…
iequidoo a6c8f8d
feat: mimeparser: Omit Legacy Display Elements (#7130)
iequidoo 46cf8a8
feat: Add Config::StdHeaderProtectionComposing (enables composing as …
iequidoo c9a7237
test: HP-Outer headers are added to messages with standard Header Pro…
iequidoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2632,12 +2632,6 @@ async fn test_can_send_group() -> Result<()> { | |
| /// the recipients can't see the identity of their fellow recipients. | ||
| #[tokio::test(flavor = "multi_thread", worker_threads = 2)] | ||
| async fn test_broadcast_members_cant_see_each_other() -> Result<()> { | ||
| fn contains(parsed: &MimeMessage, s: &str) -> bool { | ||
| assert_eq!(parsed.decrypting_failed, false); | ||
| let decoded_str = std::str::from_utf8(&parsed.decoded_data).unwrap(); | ||
| decoded_str.contains(s) | ||
| } | ||
|
|
||
| let mut tcm = TestContextManager::new(); | ||
| let alice = &tcm.alice().await; | ||
| let bob = &tcm.bob().await; | ||
|
|
@@ -2669,8 +2663,8 @@ async fn test_broadcast_members_cant_see_each_other() -> Result<()> { | |
| ); | ||
| let parsed = charlie.parse_msg(&auth_required).await; | ||
| assert!(parsed.get_header(HeaderDef::AutocryptGossip).is_some()); | ||
| assert!(contains(&parsed, "[email protected]")); | ||
| assert_eq!(contains(&parsed, "[email protected]"), false); | ||
| assert!(parsed.decoded_data_contains("[email protected]")); | ||
| assert_eq!(parsed.decoded_data_contains("[email protected]"), false); | ||
|
|
||
| let parsed_by_bob = bob.parse_msg(&auth_required).await; | ||
| assert!(parsed_by_bob.decrypting_failed); | ||
|
|
@@ -2698,8 +2692,8 @@ async fn test_broadcast_members_cant_see_each_other() -> Result<()> { | |
| ); | ||
| let parsed = charlie.parse_msg(&member_added).await; | ||
| assert!(parsed.get_header(HeaderDef::AutocryptGossip).is_some()); | ||
| assert!(contains(&parsed, "[email protected]")); | ||
| assert_eq!(contains(&parsed, "[email protected]"), false); | ||
| assert!(parsed.decoded_data_contains("[email protected]")); | ||
| assert_eq!(parsed.decoded_data_contains("[email protected]"), false); | ||
|
|
||
| let parsed_by_bob = bob.parse_msg(&member_added).await; | ||
| assert!(parsed_by_bob.decrypting_failed); | ||
|
|
@@ -2713,8 +2707,8 @@ async fn test_broadcast_members_cant_see_each_other() -> Result<()> { | |
| let hi_msg = alice.send_text(alice_broadcast_id, "hi").await; | ||
| let parsed = charlie.parse_msg(&hi_msg).await; | ||
| assert_eq!(parsed.header_exists(HeaderDef::AutocryptGossip), false); | ||
| assert_eq!(contains(&parsed, "[email protected]"), false); | ||
| assert_eq!(contains(&parsed, "[email protected]"), false); | ||
| assert_eq!(parsed.decoded_data_contains("[email protected]"), false); | ||
| assert_eq!(parsed.decoded_data_contains("[email protected]"), false); | ||
|
|
||
| let parsed_by_bob = bob.parse_msg(&hi_msg).await; | ||
| assert_eq!(parsed_by_bob.decrypting_failed, false); | ||
|
|
@@ -2730,8 +2724,8 @@ async fn test_broadcast_members_cant_see_each_other() -> Result<()> { | |
| "[email protected] [email protected]" | ||
| ); | ||
| let parsed = charlie.parse_msg(&member_removed).await; | ||
| assert!(contains(&parsed, "[email protected]")); | ||
| assert_eq!(contains(&parsed, "[email protected]"), false); | ||
| assert!(parsed.decoded_data_contains("[email protected]")); | ||
| assert_eq!(parsed.decoded_data_contains("[email protected]"), false); | ||
|
|
||
| let parsed_by_bob = bob.parse_msg(&member_removed).await; | ||
| assert!(parsed_by_bob.decrypting_failed); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.