Age | Commit message (Collapse) | Author |
|
Fixes the function signature of `parseMultipartResponse` and uses the
default random boundary when creating a new multipart response.
|
|
Needs https://github.com/matrix-org/gomatrixserverlib/pull/437
|
|
Grafana Pyroscope unveiled that we are hitting
https://github.com/golang/go/blob/ad10fbd3c4ec7413775028213f4d5089b18926f7/src/database/sql/sql.go#L2739-L2742
for media DB queries.
Making the methods pointer receivers fixes this.
(Also some minor `error` cosmetic updates)
|
|
Part of #3222
https://github.com/matrix-org/matrix-spec-proposals/pull/3828
|
|
"Shamelessly" stolen from
https://github.com/matrix-org/synapse/pull/15988
|
|
Fixes #3160
|
|
As otherwise existing connections aren't reused.
|
|
Return multimedia with a disposition type of attachment instead of
inline. NVT#1548992
Signed-off-by: Josh Qou [jqou@icloud.com](mailto:jqou@icloud.com)
Co-authored-by: Jon <haddock.05.roast@icloud.com>
|
|
|
|
|
|
Sister PR to https://github.com/matrix-org/gomatrixserverlib/pull/364
Read this commit by commit to avoid going insane.
|
|
Part of a series of refactors on GMSL.
|
|
Removes `BaseDendrite` to, hopefully, make testing and composing of
components easier in the future.
|
|
|
|
Preparations to actually remove/replace `BaseDendrite`.
Quite a few changes:
- SyncAPI accepts an `fulltext.Indexer` interface (fulltext is removed
from `BaseDendrite`)
- Caches are removed from `BaseDendrite`
- Introduces a `Router` struct (likely to change)
- also fixes #2903
- Introduces a `sqlutil.ConnectionManager`, which should remove
`base.DatabaseConnection` later on
- probably more
|
|
This adds store & forward relays into dendrite for p2p.
A few things have changed:
- new relay api serves new http endpoints for s&f federation
- updated outbound federation queueing which will attempt to forward
using s&f if appropriate
- database entries to track s&f relays for other nodes
|
|
|
|
* Add Cache-Control header
* Raise rate_limiting threshold to 20
|
|
* Rate limiting changes
This makes the following changes:
* For logged in users, the rate limiting now applies to the device session rather than the remote IP address;
* For non-logged in users, the rate limiting continues to apply to remote address as it does today;
* It is now possible to add user IDs to the `exempt_user_ids` option under `rate_limiting` to exclude bots from rate limiting;
* Admin and appservice users are now exempt from rate limiting by default.
* Fix build with media API
|
|
Co-authored-by: kegsay <kegan@matrix.org>
|
|
* Specify interfaces used by appservice, do half of clientapi
* convert more deps of clientapi to finer-grained interfaces
* Convert mediaapi and rest of clientapi
* Somehow this got missed
|
|
* Simplify federation API `AddPublicRoutes`
* Simplify client API `AddPublicRoutes`
* Simplify media API `AddPublicRoutes`
* Simplify sync API `AddPublicRoutes`
* Simplify `AddAllPublicRoutes`
|
|
* Allow monolith components to share a single database pool
* Don't yell about missing connection strings
* Rename field
* Setup tweaks
* Fix panic
* Improve configuration checks
* Update config
* Fix lint errors
* Update comments
|
|
* Return "null" if MaxFileSizeBytes is 0
* Add comment and nil check (better save than sorry)
* Simplify config
|
|
non-deterministic order; silence expected
error when tests are run multiple times against the same postgres database (cherry-picked from #2395)
Signed-off-by: Brian Meek <brian@hntlabs.com>
|
|
* Refactor mediaapi storage layer
* Verify filetype before trying to create thumbnails
* Add media api storage tests
* Fix returned values
|
|
|
|
`fetchRemoteFile`
|
|
* Return error from remote download requests
* Remove redundant err check, return better message if file does not exist
|
|
|
|
* Media endpoints on `/v3`
* Keep `/v1` too?
|
|
* Modify some log levels
* Update gomatrixserverlib to matrix-org/gomatrixserverlib@336334f
* Update gomatrixserverlib to matrix-org/gomatrixserverlib@cde7ac8
* Demote warning about key change producer
* Add more useful roomserver logging
* Further tweaking
|
|
* Add /media/r0/config handler
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Add rate limiting to media api
* Rename variable
* Add passing tests
* Don't send multiple headers
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
|
|
|
|
|
|
Co-authored-by: Felix Freeman <libsys@hacktivista.org>
|
|
- Lower cased error messages
Signed-off-by: Ryan Whittington <twentybitdev@gmail.com>
Co-authored-by: kegsay <kegan@matrix.org>
|
|
* Only include go-sqlite3 on the relevant binaries
* The driver name is always sqlite3 now
* Update to matrix-org/go-sqlite3-js@e537baa
|
|
* Revert "Set MaxFileSizeBytes <= 0 to "unlimited" (#1875)"
This reverts commit 9ed044042156a9bdfafb4ae9830b3ed41225444e.
* Actually allow unlimited upload
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
Co-authored-by: kegsay <kegan@matrix.org>
|
|
|
|
* Set MaxFileSizeBytes < 0 to "unlimited"
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* int64 overflows later in mediaapi/routing/upload.go[doUpload]
* Prevent int overflow when uploading
|
|
* Use LimitReader to prevent DoS risk
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Check if bytesWritten is equal to the maxFileSize
Add tests
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
* Use oldschool defer to cleanup after the tests
* Let LimitReader read MaxFileSizeBytes + 1
Co-authored-by: Kegsay <kegan@matrix.org>
|
|
|
|
* Remove the Content-Length requirement
* Make sure that the file size does not exceed max content size
* Address review comment - universally check if temp file size exceeds max file size
|
|
* Get downloaded file size regardless of the Content-Size header
Signed-off-by: Florian Le Minoux <darkgallium+git@deuxfleurs.fr>
* fixing lint issues
* Don't exhaust memory for large files, don't limit more than necessary
* Don't use errors.Wrap in download.go
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
|
|
* Move config, setup, mscs into "setup" top-level folder
* oops, forgot the EDU server
* Add setup
* goimports
|
|
|
|
- Make sure we always cleanup the temp directory on error.
- Complain about it having an error prone API shape.
|
|
* Filenames based on hashes but media IDs randomly generated and per-upload metadata
* Lint
* Comment generateMediaID
|
|
* Offset updates take place using TransactionWriter
* Refactor TransactionWriter in current state server
* Refactor TransactionWriter in federation sender
* Refactor TransactionWriter in key server
* Refactor TransactionWriter in media API
* Refactor TransactionWriter in server key API
* Refactor TransactionWriter in sync API
* Refactor TransactionWriter in user API
* Fix deadlocking Sync API tests
* Un-deadlock device database
* Fix appservice API
* Rename TransactionWriters to Writers
* Move writers up a layer in sync API
* Document sqlutil.Writer interface
* Add note to Writer documentation
|