Commit Graph

141 Commits

Author SHA1 Message Date
aae126a3de xmpp: Add support for setting reconnection policies 2022-05-30 16:26:34 +02:00
fc69261029 refactor: Move implies into moxlib 2022-05-13 14:01:05 +02:00
169457c9c9 test: Adapt to changes in [XmppManagerAttributes] 2022-05-07 23:48:51 +02:00
491c7e066e test: Adapt to changed in moxdns 2022-05-07 23:46:21 +02:00
689e115559 meta: Use moxplatform for platform-specific tasks 2022-04-28 21:43:01 +02:00
a5be79b0d4 xmpp: Move the ping management out of [StreamManagementManager]
This allows the socket to say whether whitespace pings are allowed
and whether it manages its own keepalives or not.
2022-04-20 22:57:30 +02:00
e99e4ba540 test: Fix test naming 2022-04-20 20:52:51 +02:00
226e0bcba2 xmpp: Fix Issue with stream management (And null-operator on null)
As it turns out, there is a race-condition in sendStanza, if the
response is fast enough here. So the solution is to simply put
_awaitingResponse behind a mutex lock and turn code accessing it
into a critical section.
2022-04-20 18:33:12 +02:00
75fc24f79e xmpp: Redact sending of SASL nonzas 2022-04-18 17:12:22 +02:00
96a251ec87 xmpp: Add a test for XEP-0363 2022-04-18 13:23:25 +02:00
96009c9037 style: Make tests fit naming convention 2022-04-18 13:01:07 +02:00
e2ba266e64 style: Remove unused variable 2022-04-18 13:00:34 +02:00
9f4762b388 test: Finally fix the roster tests 2022-04-18 12:59:44 +02:00
cc7acae24c xmpp: Make JID parsing ignore whitespaces 2022-04-17 23:08:51 +02:00
112e23ba9a xmpp: Use the xml package for putting the data together 2022-04-17 11:01:32 +02:00
e79a46fd83 ui: Implement a LRU cache 2022-04-13 19:10:09 +02:00
a58cec32db xmpp: Allow disconnecting and detect socket closure 2022-04-12 18:13:58 +02:00
8556f61012 style: Fix a lot of linter warnings 2022-04-10 22:57:04 +02:00
ae545ce26d ui: Implement a basic chat state indicator 2022-04-10 12:30:20 +02:00
8a518a8aa1 xmpp: Improve Stream Management by looking at Conversations 2022-04-09 19:47:33 +02:00
9320500b32 test: Fix tests not compiling 2022-04-06 14:49:27 +02:00
75811d7dee service: Make [XmppState] and [PreferencesState] migratable 2022-04-06 14:46:08 +02:00
b08fe670bf service: Move the xmpp service over to an [EventHandler] 2022-03-27 12:09:12 +02:00
7fcaca6491 service: Implement the [EventHandler] 2022-03-22 13:27:47 +01:00
66d04f9346 shared: Add an event handler 2022-03-21 13:07:51 +01:00
aeb17c824d refactor: eventhandler -> awaitabledatasender 2022-03-21 12:42:24 +01:00
8993fa96fc ui: Add the AwaitableDataSender 2022-03-21 12:37:10 +01:00
ae643e7009 xmpp: Rework the stanza handler 2022-03-11 21:39:42 +01:00
0f872908eb service: Fix removing a roster item twice 2022-03-10 12:22:19 +01:00
e010d1321b xmpp: Validate XEP-0368 against the expected domain 2022-03-09 18:00:13 +01:00
5b0073af1f xmpp: Implement XEP-0198 resumption location 2022-03-09 11:02:19 +01:00
32cfb2a5b3 xmpp: Implement StartTLS 2022-03-08 21:50:21 +01:00
3664cb68ec xmpp: Improve the Stream Management implementation
Give each stanza, by default, 10 seconds to be acked. This helps
in handling bursts during which we sent a lot of stanzas and the
acks start trickling in, which causes a lot of stanzas to be
uselessly retransmitted.
2022-03-06 12:02:18 +01:00
7ea4ad62e2 xmpp: Implement XEP-0004 2022-03-04 23:03:56 +01:00
be701a5e0f xmpp: Begin writing a onBadCertificate function 2022-03-01 20:36:45 +01:00
91c5bfcf57 xmpp: Implement Message Carbons 2022-03-01 20:26:55 +01:00
430cb8ca24 xmpp: Possibly fix #4 2022-03-01 14:49:51 +01:00
c1b83b917d ui: Implement a stubbed download button 2022-02-28 12:39:40 +01:00
c77b457c21 service: Unify thumbnail handling for SFS and SIMS 2022-02-27 22:12:05 +01:00
64e257b9f8 xmpp: Once again fix XEP-0198 2022-02-22 21:51:20 +01:00
0acabce757 xmpp: Fix roster pushes again 2022-02-22 21:21:31 +01:00
8c40acda96 xmpp: Fix the roster code 2022-02-22 16:25:12 +01:00
2cc5942ca4 xmpp: Make xep_0030.dart a bit cleaner 2022-02-17 12:41:45 +01:00
d0aca8d879 lint: Fix most linter warnings 2022-02-17 12:34:35 +01:00
0fa62f904a meta: Add an UDP logger 2022-02-16 20:38:15 +01:00
0572226dd2 xmpp: Query-disco on presence 2022-02-16 13:02:36 +01:00
8bce32dcaf test: The list must be 'mutable' as we sort it 2022-02-06 19:05:12 +01:00
e33b290d24 style: Fix linter issues 2022-02-06 18:48:59 +01:00
973982e55d xmpp: Communicate stream closure from the buffer 2022-02-06 18:38:23 +01:00
023b8f3249 xmpp: Fix tests breaking because of moxdns 2022-02-06 14:35:38 +01:00
8ecbda87e1 xmpp: Make SCRAM more robust by having a KV parser 2022-02-06 14:16:51 +01:00
bcd44f1140 xmpp: Check the server signature at the end of SASL SCRAM 2022-02-06 13:48:26 +01:00
720798814c refactor: Make helpers and constants shared 2022-01-26 12:28:49 +01:00
346c012c08 xmpp: Finally use the system resolver using miniDNS 2022-01-25 21:21:00 +01:00
4fd1056195 refactor: Move all XmppEvents into events.dart 2022-01-25 15:56:20 +01:00
9eb0387ab3 refactor: Remove the nonzas/ folder 2022-01-25 15:53:52 +01:00
367970a06e refactor: Remove the stanzas/ folder 2022-01-25 15:50:25 +01:00
844b22d887 xmpp: Factor out moxxy specific disco features 2022-01-23 16:17:00 +01:00
dbeae3751f xmpp: Fix the Stream Management implementation
There was a bug that on resumption messages would be received again.
The cause of this was probably that we send a <resume /> with an
h equal to the stanzas we sent. If we sent and received an equal amount,
no problem. But if we receive more than we sent, then duplicates will
start flooding in.
2022-01-23 13:41:51 +01:00
3073321ecd style: Fix filename issues 2022-01-23 12:18:30 +01:00
f8acf98ebd style: Spent 6h fixing linter warnings 2022-01-21 17:44:48 +01:00
72db9039f8 test: Add tests for the XEP-0352 implementation 2022-01-21 11:36:12 +01:00
1b4872f016 xmpp: Improve tests and fix our first vulnerability
In order to test the [RosterManager], I decided to add a test to ensure
vulnerabilities like CVE-2015-8688 won't happen. But as it turns out,
I got the logic wrong in the [RosterManager] base implementation which
would've allowed a malicious actor to inject a roster push. oof.
2022-01-21 11:23:09 +01:00
abadc0214f xmpp: Implement plain resource binding 2022-01-21 09:34:38 +01:00
5abb3059bf xmpp: Re-implement read-only support of chat markers 2022-01-20 22:06:01 +01:00
c09184597c xmpp: Make StanzaHandler callbacks async 2022-01-20 17:55:26 +01:00
71357e1409 test: Fix SM test 2022-01-20 17:13:52 +01:00
a37ae65588 test: Fix them 2022-01-20 13:18:34 +01:00
adc9979df8 xmpp: Huge rework of stanza handling
Instead of putting everything into [XmppConnection], let's put
everything into its own [XmppManagerBase] base subclass.

- Improves testability
- Makes extensions easier
- Allows easier usage of lib/xmpp as its own library
2022-01-19 15:59:48 +01:00
7cf0a8a826 xmpp: Implement XEP-0115 2022-01-18 12:07:50 +01:00
dd76e219ea xmpp: Improve the socket 2022-01-17 14:12:04 +01:00
54cf44706a xmpp: Make reconnecting work 2022-01-17 14:04:30 +01:00
870869c3a1 test: Modularize the StubSocket 2022-01-16 13:33:52 +01:00
b02a344fb3 xmpp: Fix removing roster items 2022-01-09 23:38:28 +01:00
09d9d52a5b xmpp: Rework 2022-01-09 22:50:15 +01:00
5eed04290e xmpp: Factor out the stream buffering for testing 2022-01-02 14:44:31 +01:00
1acc2630b4 xmpp: RECEIVE MESSAGES! 2022-01-01 21:24:27 +01:00
0c1714f6b9 xmpp: Fix tests 2021-12-31 23:14:07 +01:00
127a91120d test: Fix the build-parse test 2021-12-31 12:24:06 +01:00
293af5b360 xmpp: Make PLAIN auth configurable 2021-12-30 23:26:03 +01:00
df258df2e4 xmpp: Migrate to stringxml 2021-12-30 22:57:19 +01:00
d093c74680 xmpp: Implement XEP-0368 lookup 2021-12-30 20:43:52 +01:00
b8efef3497 xmpp: Use classes instead of strings for the JID 2021-12-30 20:06:20 +01:00
23f9c48200 xmpp: Implement my own XMPP library 2021-12-30 19:49:01 +01:00
2338648afb ui: Add missing test for validateJid 2021-12-27 18:09:03 +01:00
f2206f62c9 ui: Add basic JID validation 2021-12-26 20:57:22 +01:00
402cbb3738 ui: Nicely format the message timestamps 2021-12-26 13:41:36 +01:00
fac5d6414c ui: Add timestamp strings for conversations 2021-12-26 13:30:34 +01:00
20f17179e1 ui: Fix crash when adding a chat if one is already open 2021-12-26 12:34:02 +01:00
22ecadf865 tests: Fix padInt not padding 9 2021-12-24 23:26:45 +01:00
27e543016f Initial commit 2021-12-21 16:15:45 +01:00