mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +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 |