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

Introduce a higher level DisplayName struct which helps to protect against impersonation via display names #4237

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

poljar
Copy link
Contributor

@poljar poljar commented Nov 8, 2024

No description provided.

@poljar poljar requested a review from a team as a code owner November 8, 2024 13:33
@poljar poljar requested review from jmartinesp and removed request for a team November 8, 2024 13:33
@poljar poljar force-pushed the poljar/homologlyph-pr branch from f3a80cb to e7b7844 Compare November 8, 2024 13:41
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 92.10526% with 9 lines in your changes missing coverage. Please review.

Project coverage is 85.03%. Comparing base (05505a5) to head (2e122f4).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ates/matrix-sdk-base/src/deserialized_responses.rs 91.66% 4 Missing ⚠️
crates/matrix-sdk-base/src/sliding_sync/mod.rs 33.33% 2 Missing ⚠️
crates/matrix-sdk-base/src/store/ambiguity_map.rs 88.23% 2 Missing ⚠️
crates/matrix-sdk-sqlite/src/state_store.rs 95.65% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4237      +/-   ##
==========================================
+ Coverage   85.01%   85.03%   +0.01%     
==========================================
  Files         274      274              
  Lines       30043    30107      +64     
==========================================
+ Hits        25542    25602      +60     
- Misses       4501     4505       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Contributor

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

crates/matrix-sdk-base/src/deserialized_responses.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-base/src/deserialized_responses.rs Outdated Show resolved Hide resolved
@jmartinesp
Copy link
Contributor

It seems like Rust doesn't like the way the lazy regexes are implemented though.

@poljar
Copy link
Contributor Author

poljar commented Nov 8, 2024

It seems like Rust doesn't like the way the lazy regexes are implemented though.

Yeah, though we don't mutate things but I'll see how to implement this without any compiler complaints.

@poljar poljar force-pushed the poljar/homologlyph-pr branch from 5b5d6d4 to 0ef6dac Compare November 13, 2024 10:47
@poljar poljar requested a review from a team November 13, 2024 11:03
@poljar poljar force-pushed the poljar/homologlyph-pr branch 6 times, most recently from a9a2bff to 62c7405 Compare November 15, 2024 15:29
@poljar
Copy link
Contributor Author

poljar commented Nov 15, 2024

@dkasak are you happy now with the PR? Can this be approved?

@poljar poljar mentioned this pull request Nov 15, 2024
11 tasks
poljar and others added 2 commits November 19, 2024 11:39
This patch introduces a struct that normalizes and sanitizes display
names. Display names can be a source of abuse and can contain characters
which might make it hard to distinguish one display name from the other.

This struct attempts to make it easier to protect against such abuse.

Changelog: Introduce a DisplayName struct which normalizes and sanitizes
display names.

Co-authored-by: Denis Kasak <[email protected]>
@poljar poljar force-pushed the poljar/homologlyph-pr branch from 1391e09 to 2e122f4 Compare November 19, 2024 10:39
@poljar poljar enabled auto-merge (rebase) November 19, 2024 10:51
@poljar poljar merged commit d40aac8 into main Nov 19, 2024
41 checks passed
@poljar poljar deleted the poljar/homologlyph-pr branch November 19, 2024 10:54
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.

6 participants