Commit Graph

1315 Commits

Author SHA1 Message Date
S7evinK
1cd525ef0d
Extend device_devices table (#1471)
* Add last_used_ts and IP to database

* Add migrations

* Rename column
Prepare statements

* Add interface method and implement it

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Rename struct fields

* Add user_agent to database

* Add userAgent to registration calls

* Add missing "IF NOT EXISTS"

* use txn writer

* Add UserAgent to Device

Co-authored-by: Kegsay <kegan@matrix.org>
2020-10-09 09:17:23 +01:00
Pestdoktor
c4c8bfd027
reject invalid UTF-8 (#1472)
* reject invalid UTF-8

Signed-off-by: Jonas Fentker <jonas@fentker.eu>

* update sytest-whitelist

Signed-off-by: Jonas Fentker <jonas@fentker.eu>

Co-authored-by: Kegsay <kegan@matrix.org>
2020-10-09 09:15:51 +01:00
Loïck Bonniot
f3e8ae01ef
Implement fully read markers (#1475)
See #653

Signed-off-by: Loïck Bonniot <git@lesterpig.com>

Co-authored-by: Kegsay <kegan@matrix.org>
2020-10-09 09:15:35 +01:00
Kegsay
009401ad4d
Version 0.1.0
Beta README (#1466)

* Beta docs

* More tweaks

* More docs

* Update README.md (#1497)

* Call out missing features

* Add CHANGES

* Call out CHANGES

* Update INSTALL.md

* Update README.md

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2020-10-08 17:47:43 +01:00
Kegan Dougal
b12b7abcc0 v0.1.0
Squashed commit of the following:

commit 570528e5f19d76fe2fd7ea646246eea9650b1b60
Author: Kegan Dougal <kegan@matrix.org>
Date:   Thu Oct 8 14:52:10 2020 +0100

    v0.1.0

commit 02c020bced3be6d1a63e1001ab9c0ef6231ba087
Merge: db840f02 8035c50c
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date:   Thu Oct 8 14:46:32 2020 +0100

    Merge branch 'master' into v0.1.0

commit db840f025b5d7b7c7e1ba905646571cb03dd7b22
Merge: adc19a3d 78f6e1a3
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date:   Thu Oct 8 13:31:36 2020 +0100

    Merge branch 'master' into v0.1.0

commit adc19a3d5f0c9d5a85b3c1dd7d1772236fb8cc9b
Merge: c8fc6855 3e12f6e9
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date:   Thu Oct 8 10:31:58 2020 +0100

    Merge branch 'master' into v0.1.0

commit c8fc68555c3607b0153d10df91d357d9603ccf90
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date:   Wed Oct 7 18:41:04 2020 +0100

    Version 0.1.0rc3

commit 15bf3851415dc21ebcfa98e0f2a5ec725034d6dd
Merge: e7d9eea4 8bca7a83
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date:   Wed Oct 7 18:39:25 2020 +0100

    Merge branch 'master' into v0.1.0

commit e7d9eea4a09be7b05a87b1df2a9e87d3109e8fcc
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date:   Mon Oct 5 17:56:45 2020 +0100

    v0.1.0rc2

commit 3fa76370f214e2ba3ec04f4c6f0f63d3baa273e7
Merge: f7cecdd9 52ddded7
Author: Neil Alexander <neilalexander@users.noreply.github.com>
Date:   Mon Oct 5 17:56:28 2020 +0100

    Merge branch 'master' into v0.1.0

commit f7cecdd9a85fe2806a99e426b806832e7036da1e
Author: Kegan Dougal <kegan@matrix.org>
Date:   Fri Oct 2 17:25:59 2020 +0100

    Bump to 0.1.0rc1
2020-10-08 14:53:46 +01:00
Neil Alexander
8035c50c06
Don't get into situations where we have no forward extremities 2020-10-08 14:46:25 +01:00
Neil Alexander
78f6e1a31e
Don't set new state NID if state regression 2020-10-08 13:30:30 +01:00
Kegsay
a846dad0e1
Return what we have when we encounter missing events when servicing backfill/gme (#1499)
We expect to have missing events as we walk back in the DAG over federation
as we didn't always create the room. When checking if the server is allowed
to see those events, just give up and stop rather than fail the request.
2020-10-08 12:22:00 +01:00
Neil Alexander
429bd48129
Return a non-fatal error to the federation API on a state regression (#1498)
* Return a non-fatal error to the federation API on a state regression

* Return no error but don't morph state
2020-10-08 12:13:50 +01:00
Kegsay
3e12f6e9c2
Remove notifs about key changes in syncapi (#1496)
The join/leave events themselves will wake up the right people so we
needn't do it twice.
2020-10-08 10:27:10 +01:00
Neil Alexander
8b880be57e
Include a stripped version of the invite itself (#1495) 2020-10-08 10:03:37 +01:00
Neil Alexander
8bca7a83a9
Update monolith -api behaviour (#1484)
* Update monolith -api mode listeners

* Fix check

* Fix another check

* Update HTTP API addr behaviour

* Redefine NoExternalListener

* NoListener
2020-10-07 16:59:22 +01:00
Kegsay
bf7e85848b
Rename serverkeyapi to signingkeyserver (#1492)
* Rename serverkeyapi to signingkeyserver

We use "api" for public facing stuff and "server" for internal stuff.
As the server key API is internal only, we call it 'signing key server',
which also clarifies the type of key (as opposed to TLS keys, E2E keys, etc)

* Convert docker/scripts to use signing-key-server

* Rename missed bits
2020-10-07 16:23:18 +01:00
Neil Alexander
533006141e
Return 200 on join before time out (#1493)
* Return 200 on join afer 15 seconds if nothing better has happened by that point

* Return 202 instead, 20 second timeout
2020-10-07 15:29:14 +01:00
Neil Alexander
d821f9d3c9
Deep checking of forward extremities (#1491)
* Deep forward extremity calculation

* Use updater txn

* Update error

* Update error

* Create previous event references in StoreEvent

* Use latest events updater to row-lock prev events

* Fix unexpected fallthrough

* Fix deadlock

* Don't roll back

* Update comments in calculateLatest

* Don't include events that we can't find references for in the forward extremities

* Add another passing test
2020-10-07 14:05:33 +01:00
Neil Alexander
f7c15071de
Don't return 500s on checking to see if a remote server is allowed to see an event we don't know about (#1490) 2020-10-07 10:30:27 +01:00
Kegsay
0f7e707f39
Optimise servers to backfill from (#1485)
- Prefer perspective servers if they are in the room.
- Limit the number of backfill servers to 5 to avoid taking too long.
2020-10-06 18:09:02 +01:00
Neil Alexander
4feff8e8d9
Don't give up if we fail to fetch a key (#1483)
* Don't give up if we fail to fetch a key

* Fix logging line

* furl nolint
2020-10-06 17:59:08 +01:00
Neil Alexander
ee79d662e7
Update to matrix-org/gomatrixserverlib#233 2020-10-06 15:37:31 +01:00
Neil Alexander
d69eba10e5
Add furl (#1482)
* Add furl

* Add POST support
2020-10-06 14:51:32 +01:00
Kegsay
1eaf7aa27e
Use [] not null when there are no devices (#1480) 2020-10-06 11:05:15 +01:00
Neil Alexander
bf90db5b60
Remove KindRewrite (#1481)
* Don't send rewrite events

* Remove final traces of rewrite events

* Remove test that is no longer needed

* Revert "Remove test that is no longer needed"

This reverts commit 9a45babff690480acd656a52f2c2950a5f7e9ada.

* Update test to use KindOutlier
2020-10-06 11:05:00 +01:00
Neil Alexander
8fb74fe99a
Yggdrasil demo tweaks 2020-10-06 10:37:52 +01:00
Neil Alexander
52ddded72d
Update to matrix-org/gomatrixserverlib#232 2020-10-05 17:56:18 +01:00
Neil Alexander
2e71d2708f
Resolve state after event against current room state when determining latest state changes (#1479)
* Resolve state after event against current room state when determining latest state changes

* Update sytest-whitelist

* Update sytest-whitelist, blacklist
2020-10-05 17:47:08 +01:00
Neil Alexander
4e6b7f726d
Update to matrix-org/gomatrixserverlib#230 2020-10-05 12:42:56 +01:00
S7evinK
2bfab5f58b
Add example goose sqlite3 migration (#1474)
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
2020-10-05 11:28:10 +01:00
Neil Alexander
c4756eee0e
Don't store backfilled events using request context (#1478) 2020-10-05 11:06:31 +01:00
S7evinK
3bd66ff196
Route several paths to sync_api (#1473) 2020-10-02 22:35:54 +01:00
Loïck Bonniot
4e8c484618
Implement account deactivation (#1455)
* Implement account deactivation

See #610
Signed-off-by: Loïck Bonniot <git@lesterpig.com>

* Rename 'is_active' to 'is_deactivated'

Signed-off-by: Loïck Bonniot <git@lesterpig.com>

Co-authored-by: Kegsay <kegan@matrix.org>
2020-10-02 17:18:20 +01:00
Kegsay
279044cd90
Add history visibility guards (#1470)
* Add history visibility guards

Default to 'joined' visibility to avoid leaking events, until we get
around to implementing history visibility completely. Related #617

* Don't apply his vis checks on shared rooms

* Fix order of checks

* Linting and remove another misleading check

* Update whitelist
2020-10-02 17:08:13 +01:00
Neil Alexander
c870435c17
Update PULL_REQUEST_TEMPLATE.md 2020-10-02 16:56:13 +01:00
Neil Alexander
85c43e1bef
Don't drop federation retries for Yggdrasil demos 2020-10-02 15:14:01 +01:00
Loïck Bonniot
439bc235d7
Add 'completed' field in Interactive Auth API (#1469)
This field must be present even after authentication failure, as
tested by sytest. This is needed by #1455.

Signed-off-by: Loïck Bonniot <git@lesterpig.com>
2020-10-02 15:05:23 +01:00
Neil Alexander
fb9a8f215b
Fix initial sync (#1465)
* Fix complete sync check

* Remove unnecessary 'since' copy

* Fix failing test

* Un-whitelist a couple of tests

Co-authored-by: Kegan Dougal <kegan@matrix.org>
2020-10-02 12:50:58 +01:00
Neil Alexander
1b29e5771f
Fix build.sh 2020-10-02 11:49:13 +01:00
Neil Alexander
28454d6fb7
Log origin in /send 2020-10-02 11:38:35 +01:00
Neil Alexander
92ceb46b49
Update to matrix-org/gomatrixserverlib#227 2020-10-02 09:43:02 +01:00
S7evinK
3e01db0049
Fix golangci-lint issues (#1464)
* Fix S1039: unnecessary use of fmt.Sprintf

* Fix S1036: unnecessary guard around map access

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
2020-10-01 20:00:56 +01:00
Neil Alexander
7048532bc4
Update version imprinting (#1462)
* Add version tag constant

* Update build imprinting
2020-10-01 16:09:11 +01:00
Neil Alexander
dbae85283f
Bring docker sample config into sync with normal one 2020-10-01 15:37:45 +01:00
Neil Alexander
9b2d8f69aa
Update README.md 2020-10-01 15:28:01 +01:00
Neil Alexander
4f87df198a
Update README.md (#1461)
* Update README.md

* Maybe bullet points

* Tweaks

* Put the shields back, use text instead, less OCD problems

* One more tweak
2020-10-01 15:27:16 +01:00
Neil Alexander
b471d4d77a
Set internal HTTP API timeout to 10 minutes (#1459) 2020-10-01 15:00:35 +01:00
Kegsay
378a0520be
Add custom issue templates; fixes #1421 (#1460) 2020-10-01 15:00:16 +01:00
Neil Alexander
43b3c4a2fc
Fix bugs in nginx sample configs 2020-10-01 14:41:08 +01:00
Neil Alexander
cb4b93b16c
Add nginx sample reverse proxy configs (#1458)
* Add nginx sample reverse proxy configs

* Add line breaks at end of files
2020-10-01 14:33:48 +01:00
Neil Alexander
b1d5360335
Update HTTP clients (#1457)
* Update gomatrixserverlib

* Use separate HTTP client for API calls, set User-Agent for outbound HTTP requests
2020-10-01 11:55:17 +01:00
Neil Alexander
91fc1f1c92
Fix bug in error handling in SQLite InsertPreviousEvent (#1456) 2020-10-01 10:55:00 +01:00
Neil Alexander
fed3ebd2f1
CodeQL analysis 2020-09-30 21:18:35 +01:00