1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00
Commit graph

4694 commits

Author SHA1 Message Date
Florian Schmaus
585bcb4dc8 [jingle] Add empty element optimization for <content/> 2021-10-19 11:16:35 +02:00
Ingo Bauersachs
27ff37fa98 Add getter for the stanza associated with the exception
Fixes SMACK-916
2021-10-17 16:06:41 +02:00
Ingo Bauersachs
b675aac81b Make Smack jars OSGi bundles
Fixes SMACK-343 by using bnd instead of the deprecated Gradle
plugin that was previously used and removed in commit
d06f533bb9.
2021-10-17 15:57:48 +02:00
Ingo Bauersachs
8074ddd60a Fix BOSH connection establishment
AbstractXMPPConnection waits for the flag lastFeaturesReceived since
57961a8cc1, but it is never set from
BOSH connections. Use parseFeaturesAndNotify instead of
parseFeatures to set the signal.

Similarly the XmlEnvironment is not set from bosh, but required in
ParserUtils.getXmlLang.
2021-10-17 15:00:04 +02:00
Ingo Bauersachs
9b339efbc1 Prevent password enforcement for SASL anonymous
requirePassword from 92f4aadfdc
already excludes SASL external, but missed SASL anonymous.
2021-10-16 21:09:01 +02:00
Дамян Минков
820adf8865 [muc] Also process destory message if it contains <status/>
Fixes SMACK-915
2021-10-13 07:04:32 -07:00
Florian Schmaus
105c74b22b [muc] Call userHasLeft() *after* the leave presence was sent
Calling userHasLeft before sending the leave presence may result in
invalid state as the MUC presence lister may modify the MUCs local
state, e.g., occupantsMap, conurrently with the leave operation.

If we reset it after the leave presence was send and acknowledged,
then this can not happen as the server will not longer send any MUC
related presences to us.

Also fixes SMACK-914. In theory 52a49769f9 ("[muc] Check for
self-presence first in presence listener") alone would fix SMACK-914,
but this also fixes it indepentendly of 52a49769f9. Both commits are
sensible, so both are applied.
2021-10-11 09:09:20 +02:00
Florian Schmaus
52a49769f9 [muc] Check for self-presence first in presence listener
Fixes SMACK-914
2021-10-11 09:08:44 +02:00
Florian Schmaus
ec456399b5 [carbons] Remove erroneous assert statement in connectionClosed()
The assert statement in CarbonManager's connectionClosed() connection
listener callback was erroneous. A connection may be connected, but
never was authenticated. If now the connection is closed, then
carbonsListener was never setup (via the authenticated() callback),
causing the assert to throw an exception.
2021-09-27 14:14:01 +02:00
Florian Schmaus
ae4ff244a3 [muc] Check mucServicedDiscoInfo for null in serviceSupportsStableIds()
Fixes SMACK-913.
2021-09-27 13:56:15 +02:00
Florian Schmaus
49ad8c0954 [disco] Add DisocverInfo.nullSafeContainsFuture(DiscoverInfo, CharSequence) 2021-09-27 13:55:52 +02:00
Florian Schmaus
b57cf8375f [socks5] Remove stale null check
The method getLocalStreamHost() does no longer return 'null', hence
the null check is unnecessary.
2021-09-13 18:25:44 +02:00
Florian Schmaus
09710b3203 [socks5] Fix javadoc of getLocalStreamHost()
The method does no longer return null.

Reported-by: Simon Abykov <simon.abykov@gmail.com>
2021-09-13 18:24:54 +02:00
Florian Schmaus
55299fb7e7 [core] Assert that 'event' is not END_DOCUMENT in forwardToEndTagOfDepth() 2021-09-13 10:10:55 +02:00
Florian Schmaus
8ae5ef1f51 [socks5] Ensure that the local SOCKS5 proxy is running (if enabled)
In 9352225f44 ("Rework SOCKS5 unit tests so that they can be run in
parallel") the call to getSocks5Proxy() in
Socks5BytestreamManager.getLocalStreamHost() was removed. Since
getSocks5Proxy() does also start the local proxy, if it is not already
running, this caused Smack to no longer automatically start the local
proxy.

This commit re-adds the call to getSocks5Proxy() and fixes SMACK-912.
2021-09-13 09:58:15 +02:00
Florian Schmaus
1564b98d60
Merge pull request #490 from JonathanLennox/update-securitymode-docs
Update documentation of default SecurityMode.
2021-09-10 09:04:52 +02:00
Jonathan Lennox
f0a0796d33 Update documentation of default SecurityMode. 2021-09-09 17:28:25 +00:00
Florian Schmaus
0d73c21945 [pubsub] FormNode(Provider) should not fail if there is no DataForm
Error IQ respones may not contain a data form, e.g.

<iq type="error" id="6LXNC-48" from="pubsub.openfire.xmpp.test" to="anno@openfire.xmpp.test/5dsi4g084a">
  <pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
    <configure node="fdp/submitted/spot_report"/>
  </pubsub>
  <error code="403" type="auth">
    <forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
  </error>
</iq>

Also FormNode's toXML() already handled the case where submitForm was
'null'. Only the constructor threw a IAE if submitForm was 'null'.

Fixes SMACK-910.

Closes: https://github.com/igniterealtime/Smack/pull/471
2021-08-23 17:39:59 +02:00
Florian Schmaus
f39e433121
Merge pull request #484 from guusdk/SMACK-908_debugger-tabs_4.4-branch
SMACK-908: Don't use components to count tabs in Debugger
2021-08-03 21:31:38 +02:00
Florian Schmaus
d7c708b167
Merge pull request #486 from Flowdalic/4.4-form-fields-raw
Provide and use the raw values of form fields
2021-08-03 21:29:03 +02:00
Florian Schmaus
8f760eaeb3 [caps] Use the raw character data of form fields when caclulating the hash
Fixes SMACK-909.
2021-07-19 15:38:42 +02:00
Florian Schmaus
e626580f68 [xdata] Safe the raw character data of form field values
Related to SMACK-909.
2021-07-19 15:38:42 +02:00
Florian Schmaus
4643d07ef4 [xdata] Add missing ensureAtMostSingleValue() to parseBooleanFormField 2021-07-18 17:20:50 +02:00
Guus der Kinderen
58774ad05b SMACK-908: Don't use components to count tabs in Debugger
Although the amount of components in a JTabbedPane apparently is often equal to the amount of tabs in it, that need not be the case.
2021-07-08 15:34:16 +02:00
Florian Schmaus
00249f3a67 Smack 4.4.4-SNAPSHOT 2021-07-06 14:51:00 +02:00
Florian Schmaus
524e4b1d9b Smack 4.4.3 2021-07-06 14:33:15 +02:00
Florian Schmaus
31e4e1faf2 Do not call XmlPullParser.getName() when the event is unknown
XmlPullParser.getName() only returns a result if the current parser
event is START_ELEMENT or END_ELEMENT. If this is not the case, then
the method may throw (if StAX is used).
2021-07-06 13:37:57 +02:00
Florian Schmaus
899813a668
Merge pull request #467 from Flowdalic/4.4-data-forms
Proposed data form updates for 4.4
2021-06-04 20:58:57 +02:00
Florian Schmaus
26e6efa767 [address] Fix NPE in MultipleRecipientManager
The arguments 'to', 'cc, and 'bcc' may be null, hence ensure that they
are non-null when calling e.g. size() on them.

Fixes SMACK-907

Fixes: df96c57093 ("[address] Get rid of PacketCopy workaround")
2021-06-03 19:10:07 +02:00
Florian Schmaus
4eb5869860 [build] Remove markdown-gradle-plugin 2021-05-20 14:38:16 +02:00
Florian Schmaus
961882ff7f Add more QNAME fields to extension element classes 2021-04-18 17:23:34 +02:00
Florian Schmaus
36c7521ca2 [offline] Add OfflineMessageInfo.QNAME field
Fixes SMACK-905.
2021-04-18 17:17:48 +02:00
Florian Schmaus
b0abfe1bba [offline] Make OfflineMessageManager.NAMESPACE public 2021-04-18 17:16:38 +02:00
Florian Schmaus
090858f467 [xdata] Automatically fill required fields with a default value 2021-04-01 12:55:28 +02:00
Florian Schmaus
68edc8b9f5 [xdata] Allow FillableForm.write() ot overwrite already filled fields 2021-04-01 12:54:52 +02:00
Florian Schmaus
8c57d34b97
Merge pull request #466 from Vshnv/master
Added proxy support for XEP-0363
2021-03-29 18:15:40 +02:00
Vshnv
4736d080a1 Added proxy support for XEP-0363 2021-03-29 19:01:58 +05:30
Vshnv
525db827a9 Added support for Java's Proxy class in ProxyInfo 2021-03-29 19:01:42 +05:30
Florian Schmaus
92f4aadfdc [sasl] Avoid mechanisms that need a password when none is available 2021-03-25 15:01:15 +01:00
Florian Schmaus
72e11ebf71 [README] Fix typo; s/NOICE/NOTICE/ 2021-03-25 15:00:07 +01:00
Florian Schmaus
33d735a42e [core] Make Smack.getNoticeStream() more robust
Appearently simply calling ClassLoader.getSystemResourceAsStream()
works on Java SE but not on Android. But our FileUtils are able to
load the resource stream on Android.
2021-03-25 14:58:44 +01:00
Florian Schmaus
b58511d624 [core] Also provide incoming Nonzas to SmackDebugger 2021-03-25 14:51:25 +01:00
Florian Schmaus
5844bee1c3 [javadoc-overview] Disconnect the connection in example code 2021-03-25 12:23:39 +01:00
Florian Schmaus
a39d44ed1f [javadoc-overview] Improve 'License' section 2021-03-25 12:23:19 +01:00
Florian Schmaus
406daa78f7 [javadoc-overview] Use stanza factory in example code 2021-03-25 12:16:34 +01:00
Florian Schmaus
2dab49f048 Smack 4.4.3-SNAPSHOT 2021-03-25 09:46:57 +01:00
Florian Schmaus
9d64af26b7 Smack 4.4.2 2021-03-25 09:26:02 +01:00
Florian Schmaus
d07d46bbdc [chat2] Fix resource unlock condition
If the resource of the updated presence is equal to the currently
locked resource, then no further action is required.

Thanks to Pedro Oliveira for reporting this.

Reported-by: Pedro Oliveira <kanytu@gmail.com>
2021-03-25 08:22:12 +01:00
Florian Schmaus
eb31479913 [muc] Make sendMessage() return a MessageView of the sent message 2021-03-25 08:19:53 +01:00
Florian Schmaus
64a2db3f19 [sid] Add <origin-id/> to MUC messages if not muc#stable_id 2021-03-23 21:27:10 +01:00