1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-16 01:02:06 +01:00
Commit graph

4713 commits

Author SHA1 Message Date
Florian Schmaus
61713c500c Smack 4.4.2
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAmBcSRtfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFJs0wf/TYm4e4LlBiekmar8YnfaAObT9loDiqMJjO5s4g+trYx2U3gCKkRvKI0P
 U/jzqoJohcPY+5s/fkGKaBWjzFD5WucHyvNaP01D4EWSvHXpCMElbSxY1Uz3X4k1
 t0pmdb27DoHhtdqMfw1Cg7Nba4M+ZzdrEIkDRgCNA8H0mJoKpnsDAg8Y6kEUnvt6
 WQxmIZ49ZT9UOQnVbsXUk4t5DZDz1GdQggrDS5Sh+rZaRFy1KyDgLC+X4NQO99RV
 v3Tf4VRIy+6Nen7L/av3qwSBRqpvc1TEJauNwOnYvyuDwpwjE0tEfRuFZ8wjtkAz
 CKF+LLor+WA5Y2GCXEegLJxVd9Je6Q==
 =hZJ2
 -----END PGP SIGNATURE-----

Merge tag '4.4.2'

Smack 4.4.2
2021-03-25 11:45:03 +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
ed807d5954 Merge branch '4.4' 2021-03-23 21:41:25 +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
Florian Schmaus
4381d04831 [muc] Introduce MucMessageInterceptor 2021-03-23 21:27:10 +01:00
Florian Schmaus
b8f23eb371 [sid] Do not enable StableUniqueStanzaIdManager per default 2021-03-23 21:27:10 +01:00
Florian Schmaus
800c771700 [sid] Check if there is already a <origin-id/> in addOriginId() 2021-03-23 21:27:09 +01:00
Florian Schmaus
4fefa92e40 Merge branch '4.4' 2021-03-19 09:47:07 +01:00
Florian Schmaus
b276b89916 [sinttest] Add code comment and empty line 2021-03-18 21:32:37 +01:00
Florian Schmaus
ddf96828e4 [sinttest] Add fromMarkers array to exception message 2021-03-18 21:32:21 +01:00
Florian Schmaus
35cd1a8f88 [sinttest] Do not lazily create fromMarkers
If we do not create the fromMarkers initialized with 'false' at the
start, then it may appear like all messages are received, because we
only check for false markers. But if there is not even the fromMarkers
array, then we do not see those 'false' markers.
2021-03-18 21:32:10 +01:00
Florian Schmaus
47178fd27d Bump JUnit to 5.7.1 2021-03-18 09:01:03 +01:00
Florian Schmaus
9520aa7d90 [sinttest] Do not create myReceiveMarkers on demand 2021-03-15 19:24:19 +01:00
Florian Schmaus
11a486d84d [sinttest] Add header to NotAllMessagesReceivedException
This header maps the internal connection ID to the connection.
2021-03-15 19:22:57 +01:00
Florian Schmaus
f91598e10c [sinttest] Improve NotAllMessageReceivedException 2021-03-15 19:22:26 +01:00
Florian Schmaus
ad8eeebc0d [sinttest] Allow maxPayloadChunks == 0 2021-03-15 19:21:55 +01:00
Florian Schmaus
d75cd2acb8 [filetransfer] Pre-register 'stream-method' form field
Fixes SMACK-904.
2021-03-14 19:34:28 +01:00
Florian Schmaus
adc159186c [formtypes] Introduce LOOKASIDE_FIELD_REGISTRY
Some field's like stream-method of XEP-0096, which is of type
list-single, need to be pre-registered.
2021-03-14 17:58:13 +01:00
Florian Schmaus
73941629f3 [sinttest] Call OutgoingFiletransfer.getException() in case of error 2021-03-14 17:57:13 +01:00
Florian Schmaus
2779187d8c [filetransfer] Set the status to error in setException()
FileTransfer would previously not change the status, even though an
exception has been set, leading users to believe that the transfer is
still ongoing, when it is not.
2021-03-14 17:54:03 +01:00
Florian Schmaus
c564c89c40 [extensions] Add OutgoingFileTransfer.setCallback()
Some methods of OutgoingFileTransfer take already the
NegotiationProgress callback as argument, some do not. The API is not
ideal, and adding a setter for the callback at least makes it possible
to always have the callback.
2021-03-14 17:52:12 +01:00
Florian Schmaus
f2b44f65d9 [tcp] Add code comment why we need to set "running = false" here 2021-03-14 17:51:33 +01:00
Florian Schmaus
9d1b88a877 [muc] Do not filter for presence ID if #stable_id is not announced
On leave(), do not filter for presence ID if the MUC service does not
announce #stable_id.
2021-03-14 12:48:01 +01:00
Florian Schmaus
61cb73ee37 [core] Add AndFilter(List<StanzaFilter>) constructor 2021-03-14 12:48:01 +01:00
Florian Schmaus
14142a0ef2 [omemo] Introduce OmemoAesCipher as central AES API
OmemoAesCipher is the sole point where OMEMO related AES operations
are performed. This allows OmemoAesCipher to check in a static block
if AES is available. If AES is not available it throws a (hopefully)
helpfull exception message.

Typically AES is not available on Android if no security provider
providing AES, like Bouncy Castle, has been explicitly configured.
2021-03-14 12:48:01 +01:00
Florian Schmaus
b7905d585d [omemo] Use RandomUtil.fillWithSecureRandom() to generate IV 2021-03-14 12:48:01 +01:00
Florian Schmaus
17ac41c8cb [core] Add RandomUtil.fillWithSecureRandom(byte[]) 2021-03-14 12:48:01 +01:00
Florian Schmaus
7cf0112487 [omemo] Cleanup CryptoFailedException
Remove the unused list of exceptions and add a (String, Exception)
constructor.
2021-03-14 12:48:00 +01:00
Florian Schmaus
c7b429535b [doc] Fix extensions/index.md table 2021-03-10 10:24:39 +01:00
Florian Schmaus
f9114f780d [tcp] Ignore exceptions in reader thread if writer was terminated
If we do not ignore the exception, then users may receive an exception
via connectionClosedOnError() on connection termination. Those
exceptions are typically unwanted if they are caused e.g. because the
server does not send a closing stream tag.

We previously ignored exceptions in this case already, but that
behavior was changed with [1: 57961a8cc1]. This commit re-adds the
behavior.

1: 57961a8cc1
   Remove SynchronizationPoint
2021-03-09 19:27:53 +01:00
Florian Schmaus
4adbd21a0f [smack-xmlparser] Allow override of used XmlPullParserFactory 2021-03-03 22:25:32 +01:00
Florian Schmaus
3bef905ef5 [xmlparser-stax] Move getNamespace() to its friends within the file 2021-03-03 21:43:43 +01:00
Florian Schmaus
ba6968fc79 [xmlparser-stax] Fix potential IAE in StaxXmlPullParser.getNamespace()
StAX's NamespaceContext.getNamespaceURI(String) is allowed to throw an
IllegalArgumentException in case the argument is null. We simply
re-use getNamespace(String) which will substitute the default
namespace if the argument is null to avoid this.

Connection closed due to an exception
java.lang.IllegalArgumentException: Illegal to pass null as argument
at com.ctc.wstx.sr.NsInputElementStack.getNamespaceURI(NsInputElementStack.java:486)
at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.getNamespace(StaxXmlPullParser.java:113)
at org.jivesoftware.smack.AbstractXMPPConnection.parseFeatures(AbstractXMPPConnection.java:1852)
at org.jivesoftware.smack.AbstractXMPPConnection.parseFeaturesAndNotify(AbstractXMPPConnection.java:1887)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$1300(XMPPTCPConnection.java:130)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:983)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$700(XMPPTCPConnection.java:913)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:936)
at java.lang.Thread.run(Thread.java:748)

Fixes SMACK-903
2021-03-03 21:41:07 +01:00
Florian Schmaus
48f5e349b9 Smack 4.4.1
-----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAmA/eF1fFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
 NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
 IFLlCQf6A9u5hd2v36Cve/Iopx/GAjuHBNu/7DYop7gP7vLtKxUBGCS/DLn8kaov
 ujpTvdcpm6pg7F4uivMnADFqkkL9cUwsBPDyNY8c0ygfGzVPU8P47g00/SBhB7kP
 0/0In4eunXt8+tfs/afHrr1kQG66lq5J/9q8M6bbC9pUYO2g5Flxes0WW9azluVh
 zs39CCtXPeXwr6Lh+HNEyIe/WiHKnOj7zkwpV7htmOnPaedlRJj/e8KbcBDxmZhg
 zbMoI3Puq3grlA6spke6Z7HK6IeFZjbZABI4EeCEUVhUq1VvL0JurV92S672dty+
 SXX64GbA5TLbVq04I+NP28x9kgnRiw==
 =skkJ
 -----END PGP SIGNATURE-----

Merge tag '4.4.1'

Smack 4.4.1
2021-03-03 13:39:57 +01:00
Florian Schmaus
7d6891c077 Smack 4.4.2-SNAPSHOT 2021-03-03 13:38:25 +01:00
Florian Schmaus
ae44af5d63 Smack 4.4.1 2021-03-03 12:51:56 +01:00
Frank Matheron
d4d2a7a6d8 [xdata] Do not require FORM_TYPE field in FilledForm
The FillableForm API is the most convenient way of filling out a
form. Currently only forms with a FORM_TYPE can be filled, due to a
restriction in FillableForm. This makes filling out untyped forms very
cumbersome.

This commit removes the required FORM_TYPE when using FilledForm (and
therefor FillableForm). Some subclasses of FilledForm already check
that the correct FORM_TYPE is set using FilledForm#ensureFormType().
2021-03-03 12:42:17 +01:00
Florian Schmaus
bca3821343
Merge pull request #465 from Flowdalic/xdata-order-fields
[xdata] Order fields
2021-03-03 10:11:40 +01:00
Florian Schmaus
33f59fd7ed [xdata] Ensure that hidden FROM_TYPE field is first 2021-03-02 21:40:52 +01:00
Florian Schmaus
687c4f35aa
Merge pull request #464 from Flowdalic/relax-forms-v2
Relax forms (v2)
2021-03-02 15:50:09 +01:00
Florian Schmaus
1c262471e5 [xdata] Use extra registry for fields in clark notation
If a field name is in clark notation, then lookup the field's type via
an extra registry.
2021-03-02 11:43:23 +01:00
Florian Schmaus
3c4610d500 Merge branch 'master' of github.com:igniterealtime/Smack 2021-02-28 11:59:36 +01:00
Florian Schmaus
19521174f4
Merge pull request #463 from vanitasvitae/intellij_import
Add Smack import schema file for Intellij
2021-02-27 16:06:34 +01:00
af77543544
Add Smack import schema file for Intellij 2021-02-27 15:11:11 +01:00
Florian Schmaus
1a1a67a2c5 [core] Add assert message in AbstractXMPPConnection.onStreamOpen() 2021-02-25 22:09:59 +01:00
Florian Schmaus
d881395d05
Merge pull request #460 from Flowdalic/ci-java-15
Run CI also with Java 15
2021-02-15 13:43:48 +01:00
Florian Schmaus
4e90db3191 [gitlab-ci] Also check with Java 15 2021-02-15 13:12:24 +01:00