fix: determine whether a message is self-sent by cryptographic signature#8058
fix: determine whether a message is self-sent by cryptographic signature#8058
Conversation
f5f63e9 to
c1b7fa4
Compare
|
thanks, i think i addressed all review comments. If there is anything more, i am fine if you directly commit any further changes on top and merge. |
6968123 to
d97e3ee
Compare
| } | ||
| if !is_encrypted { | ||
| signatures.clear(); | ||
| } |
There was a problem hiding this comment.
I suggest to remove this if !is_encrypted ... block (see another comment)
There was a problem hiding this comment.
This block is pre-existing code not touched by this PR, though, and i'd like to keep it this way.
| // so we determine 'incoming' flag by From-address | ||
| from_is_not_self_addr | ||
| }; | ||
|
|
There was a problem hiding this comment.
| let signature = signature.filter(|_| is_encrypted); |
so that the fix also works for singed-only messages. Not very important though, but this doesn't add more code.
There was a problem hiding this comment.
as long as we don't have signed-only messages as a design goal, let's please not discuss or motivate changes according to it. Even if core would do signed-only messages, there is no concept whatsoever in the UIs about it.
There was a problem hiding this comment.
I know, it's just weird that signatures are checked after clearing and i was thinking about shared usage when the key is imported into e.g. TB. But ok, this is not a valid scenario anymore, let's not discuss it
…ature. multiple devices can temporarly have different sets of self addresses, and still need to properly recognize incoming versus outgoing messages. Disclaimer: some LLM tooling was initially involved but i went over everything by hand, and also addressed review comments.
d97e3ee to
dcb5b82
Compare
multiple devices can temporarly have different sets of self addresses, and still need to properly recognize incoming versus outgoing messages. Disclaimer: some LLM tooling was initially involved but i went over everything by hand.