mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-23 04:57:58 +01:00
980047c4e1
Smack contains two PacketFilters to filter on the from address. FromContainsFilter simply does a substring match, which is problematic as explained in SMACK-71. FromMatchesFilter partially fixes this weakness, but it still uses String#startsWith to filter on bare addresses. For example, when setup to match all JIDs with bare JID "foo@example.co", it will still match "foo@example.com". This commit changes FromMatchesFilter to test equality with the bare from instead of startsWith with the full from. Moreover, we convert all uses of FromContainsFilter to FromMatchesFilter and remove FromContainsFilter. Additionally, the unused ToContainsFilter (which as the same weaknesses) is removed, too. |
||
---|---|---|
.. | ||
src |