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

improve secure-join message detection #473

Merged
merged 6 commits into from
Jan 28, 2025
Merged

Conversation

adbenitez
Copy link
Contributor

be more strict in checking the secure-join special message structure

still missing: arbitrary Subject header is still allowed

@link2xt
Copy link
Contributor

link2xt commented Jan 24, 2025

CI is failing because of unrelated file formatting, should be fixed by merging #474 first

Would be nice to have at least one test for this fix.

Changelog is managed manually in this repo, so PR needs a changelog entry.

return False
parts_count = 0
for part in message.iter_parts():
if parts_count == 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be flattened to if parts_count > 0: return False, but otherwise the function looks good.

Copy link
Contributor Author

@adbenitez adbenitez Jan 24, 2025

Choose a reason for hiding this comment

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

improved the code to be easier to understand that what we are rejecting is when message has parts_count > 1

@adbenitez adbenitez force-pushed the adb/patch-secure-join-detection branch from 03039be to b2eaf1a Compare January 24, 2025 22:32
@link2xt
Copy link
Contributor

link2xt commented Jan 27, 2025

This needs rebase now that CI on the main is fixed.

@link2xt link2xt force-pushed the adb/patch-secure-join-detection branch from b6d49d2 to 704e464 Compare January 27, 2025 23:39
@link2xt
Copy link
Contributor

link2xt commented Jan 27, 2025

Rebased it now

@link2xt link2xt merged commit 4d915f9 into main Jan 28, 2025
6 checks passed
@link2xt link2xt deleted the adb/patch-secure-join-detection branch January 28, 2025 04:48
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.

2 participants