Use Type enum instead of String for PrivacyItem's constructor. Add
getName() to PrivacyList. Remove PrivacyRule, as it just adds unnecessary
complexity spliting PrivacyItem and PrivacyRule, they belong
together. Don't mix camel-case and c-style method names. Some minor
improvements. Add parser test.
- There is now no longer the need to use reflection for
compression-jzlib.
- compressionHandlers are a global configuration property and therefore
belong in SmackConfiguration.
RFC4616 states that if the authorization identity (authzid) parameter is
null, then it is derived from the authentication
identity (authcid). Smack currently sets both, authzid and authcid, to
the username, resulting in auth attempts of
userid\0userid\0password
instead of
userid\0password
Which are different users on most systems (e.g. Kerberos).
We now set only SASLMechanism.authenticationId to username. The
authenticate(String, CallbackHandler) method does now not longer receive
the username, as it's send by the CallbackHandler.
The VersionProvider is used to parse Version IQs. Integration:
providerManager.addIQProvider("query", Version.NAMESPACE, new VersionProvider());
The VersionManager is used to reply to Version IQs. Integration:
VersionManger.getInstanceFor(connection).setVersion(
new Version("App Name", "1.23", "Operating System"));
This fixes issue there on android in XHTMLExtension bodys contained "null" instead of actual xhtml tags
This happened due to difference in XPP implementation in KXmlPullParser (on Android) MXParser (in other cases)
This fix replaces usage of getText method of XPP with restoration of xhtml tags using XPP api.
- Fix "packet.Time is not thread-safe" (SMACK-543)
- Update packet.Time to XEP-0202
Add SDM.supportsFeature(), since this is a pattern that repeats over and
over again in Smack. Also add abstract Manager class, that takes care of
the weak reference to Connection, as this is also a repeating pattern in
Smack.
The finalize approach was flawed anyway, it would have never been
called. Because if the packetListener was still referenced from a
connection, and the connection was still strong referenced, then a
strong reference from a gc root would still exists to the manager, which
would prevent it from being gc'ed and finalized being called.
Prior to this change, Smack processes each RosterPacket (which is not of
type IQ.Type.RESULT) as a roster result.
Any other client on the XMPP network can send such a packet (not only
our server). This allows a malicious party to overwrite our Roster.
This patch changes smack so that a RosterPacket is discarded if it is
not a reply to a roster request.
In the absence of checks on the from address, it is possible for other
clients to fake an answer to an IQ request.
This commit adds an IQReplyFilter, which drops all packets which are not
a valid reply to an IQ request. In particular, it checks for packet id,
from address and packet type.
Most(?) places waiting for a reply to an IQ request are converted to use
the IQReplyFilter.
For a discussion of the issues, see the thread "Spoofing of iq ids and
misbehaving servers" from 2014-01 on the jdev@jabber.org mailing list
and following discussion in February and March.
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.
Move extension relevant configuration options from SmackConfiguration to
the extension. Introduced disabledSmackClasses that can be configured
via a system property or configuration file.