summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2023-04-03[bugfix] Add idempotency-key to allowed CORS headers (#1670)Libravatar tobi1
2023-04-03[chore]: Bump modernc.org/sqlite from 1.21.0 to 1.21.1 (#1669)Libravatar dependabot[bot]39
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.21.0 to 1.21.1. - [Release notes](https://gitlab.com/cznic/sqlite/tags) - [Commits](https://gitlab.com/cznic/sqlite/compare/v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: modernc.org/sqlite dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03[chore]: Bump github.com/miekg/dns from 1.1.52 to 1.1.53 (#1668)Libravatar dependabot[bot]9
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.52 to 1.1.53. - [Release notes](https://github.com/miekg/dns/releases) - [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release) - [Commits](https://github.com/miekg/dns/compare/v1.1.52...v1.1.53) --- updated-dependencies: - dependency-name: github.com/miekg/dns dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03[chore]: Bump github.com/KimMachineGun/automemlimit from 0.2.4 to 0.2.5 (#1666)Libravatar dependabot[bot]200
Bumps [github.com/KimMachineGun/automemlimit](https://github.com/KimMachineGun/automemlimit) from 0.2.4 to 0.2.5. - [Release notes](https://github.com/KimMachineGun/automemlimit/releases) - [Commits](https://github.com/KimMachineGun/automemlimit/compare/v0.2.4...v0.2.5) --- updated-dependencies: - dependency-name: github.com/KimMachineGun/automemlimit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-02[bugfix/frontend] Preload css styles (#1638)Libravatar tobi1
2023-03-31[bugfix] Fix multiple "updated_at" columns for media updates (#1660)Libravatar tobi3
* [bugfix] Fix multiple "updated_at" columns for media updates * silly unrelated race condition
2023-03-31[bugfix] Fix report serialization errors caused by user delete (#1659)Libravatar tobi6
* [bugfix] Fix report serialization errors caused by user delete * fix tests
2023-03-31[bugfix] Fix relationship not updating 'following' on accept follow request ↵Libravatar tobi3
(#1658)
2023-03-31[docs] Add MASH as 3rd party packaging (#1654)Libravatar Julian-Samuel Gebühr1
2023-03-30bump go-store version (includes minio) (#1657)Libravatar kim33
Signed-off-by: kim <grufwub@gmail.com>
2023-03-29[frontend] Settings navigation design (#1652)Libravatar f0x5220
* change header image alignment (cherry picked from commit df1bb339a5c597a2b668cedb3dafec5a390df120) * big mess navigation refactor * bit of cleanup * minor css tweaks * fix error rendering code for remote emoji * refactor navigation structure code * refactor styling * fix className * stash * restructure navigation generation * url wildcard formatting * remove un-implemented User menu entry * remove commented lines * clarify permissions check * invert permissions logic for clarity
2023-03-28[bugfix] Remove unique constraint on public_key (#1653)Libravatar tobi2
2023-03-28[performance] refactoring + add fave / follow / request / visibility caching ↵Libravatar kim100
(#1607) * refactor visibility checking, add caching for visibility * invalidate visibility cache items on account / status deletes * fix requester ID passed to visibility cache nil ptr * de-interface caches, fix home / public timeline caching + visibility * finish adding code comments for visibility filter * fix angry goconst linter warnings * actually finish adding filter visibility code comments for timeline functions * move home timeline status author check to after visibility * remove now-unused code * add more code comments * add TODO code comment, update printed cache start names * update printed cache names on stop * start adding separate follow(request) delete db functions, add specific visibility cache tests * add relationship type caching * fix getting local account follows / followed-bys, other small codebase improvements * simplify invalidation using cache hooks, add more GetAccountBy___() functions * fix boosting to return 404 if not boostable but no error (to not leak status ID) * remove dead code * improved placement of cache invalidation * update license headers * add example follow, follow-request config entries * add example visibility cache configuration to config file * use specific PutFollowRequest() instead of just Put() * add tests for all GetAccountBy() * add GetBlockBy() tests * update block to check primitive fields * update and finish adding Get{Account,Block,Follow,FollowRequest}By() tests * fix copy-pasted code * update envparsing test * whitespace * fix bun struct tag * add license header to gtscontext * fix old license header * improved error creation to not use fmt.Errorf() when not needed * fix various rebase conflicts, fix account test * remove commented-out code, fix-up mention caching * fix mention select bun statement * ensure mention target account populated, pass in context to customrenderer logging * remove more uncommented code, fix typeutil test * add statusfave database model caching * add status fave cache configuration * add status fave cache example config * woops, catch missed error. nice catch linter! * add back testrig panic on nil db * update example configuration to match defaults, slight tweak to cache configuration defaults * update envparsing test with new defaults * fetch followingget to use the follow target account * use accounnt.IsLocal() instead of empty domain check * use constants for the cache visibility type check * use bun.In() for notification type restriction in db query * include replies when fetching PublicTimeline() (to account for single-author threads in Visibility{}.StatusPublicTimelineable()) * use bun query building for nested select statements to ensure working with postgres * update public timeline future status checks to match visibility filter * same as previous, for home timeline * update public timeline tests to dynamically check for appropriate statuses * migrate accounts to allow unique constraint on public_key * provide minimal account with publicKey --------- Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2023-03-27[feature] Add list command to admin account (#1648)Libravatar Daenney5
* [feature] Add list command to admin account Relates to: #388 * Print booleans as yes/no too
2023-03-27[chore]: Bump github.com/tdewolff/minify/v2 from 2.12.4 to 2.12.5 (#1649)Libravatar dependabot[bot]8
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.12.4 to 2.12.5. - [Release notes](https://github.com/tdewolff/minify/releases) - [Commits](https://github.com/tdewolff/minify/compare/v2.12.4...v2.12.5) --- updated-dependencies: - dependency-name: github.com/tdewolff/minify/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27[chore] License sloth logo + default avatars under CC by-sa 4.0 (#1651)Libravatar tobi3
2023-03-24bump go-runners version to fix possible race in Processing{Media,Emoji} (#1646)Libravatar kim4
Signed-off-by: kim <grufwub@gmail.com>
2023-03-20[chore] Refactor account deleting/block logic, tidy up some other processing ↵Libravatar tobi53
things (#1599) * start refactoring account deletion * update to use state.DB * further messing about * some more tidying up * more tidying, cleaning, nice-making * further adventures in refactoring and the woes of technical debt * update fr accept/reject * poking + prodding * fix up deleting * create fave uri * don't log using requestingAccount.ID because it might be nil * move getBookmarks function * use exists query to check for status bookmark * use deletenotifications func * fiddle * delete follow request notif * split up some db functions * Fix possible nil pointer panic * fix more possible nil pointers * fix license headers * warn when follow missing (target) account * return wrapped err when bookmark/fave models can't be retrieved * simplify self account delete * warn log likely race condition * de-sillify status delete loop * move error check due north * warn when unfollowSideEffects has no target account * warn when no boost account is found * warn + dump follow when no account * more warnings * warn on fave account not set * move for loop inside anonymous function * fix funky logic * don't remove mutual account items on block; do make sure unfollow occurs in both directions!
2023-03-20[chore]: Bump github.com/miekg/dns from 1.1.51 to 1.1.52 (#1636)Libravatar dependabot[bot]17
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.51 to 1.1.52. - [Release notes](https://github.com/miekg/dns/releases) - [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release) - [Commits](https://github.com/miekg/dns/compare/v1.1.51...v1.1.52) --- updated-dependencies: - dependency-name: github.com/miekg/dns dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20[chore]: Bump github.com/microcosm-cc/bluemonday from 1.0.22 to 1.0.23 (#1635)Libravatar dependabot[bot]3
Bumps [github.com/microcosm-cc/bluemonday](https://github.com/microcosm-cc/bluemonday) from 1.0.22 to 1.0.23. - [Release notes](https://github.com/microcosm-cc/bluemonday/releases) - [Commits](https://github.com/microcosm-cc/bluemonday/compare/v1.0.22...v1.0.23) --- updated-dependencies: - dependency-name: github.com/microcosm-cc/bluemonday dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20[chore]: Bump go.uber.org/automaxprocs from 1.5.1 to 1.5.2 (#1633)Libravatar dependabot[bot]6
Bumps [go.uber.org/automaxprocs](https://github.com/uber-go/automaxprocs) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/uber-go/automaxprocs/releases) - [Changelog](https://github.com/uber-go/automaxprocs/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber-go/automaxprocs/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: go.uber.org/automaxprocs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20[chore]: Bump github.com/go-playground/validator/v10 (#1637)Libravatar dependabot[bot]16
Bumps [github.com/go-playground/validator/v10](https://github.com/go-playground/validator) from 10.11.2 to 10.12.0. - [Release notes](https://github.com/go-playground/validator/releases) - [Commits](https://github.com/go-playground/validator/compare/v10.11.2...v10.12.0) --- updated-dependencies: - dependency-name: github.com/go-playground/validator/v10 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-19[bugfix] Use account ID host as accDomain if 2nd webfinger lookup fails (#1630)Libravatar tobi1
2023-03-19[feature] Email notifications for new / closed moderation reports (#1628)Libravatar tobi35
* start fiddling about with email sending to allow multiple recipients * do some fiddling * notifs working * notify on closed report * finishing up * envparsing * use strings.ContainsAny
2023-03-16[docs] Update docs on how to login (#1626)Libravatar Daenney1
This adds a section to the docs instructing how to ensure apps will be able to successfully login to an instance when host- and account-domain differ. Resolves #1609
2023-03-14[feature] Allow admins to send test emails (#1620)Libravatar tobi17
* [feature] Allow admins to send test emails * implement unwrap on new error type * add + use gtserror types * GoToSocial Email Test -> GoToSocial Test Email * add + use getInstance db call * removed unused "unknown" error type
2023-03-14[chore] fix + update swagger docs (#1622)Libravatar tobi2
2023-03-13[chore]: Bump github.com/ulule/limiter/v3 from 3.11.0 to 3.11.1 (#1616)Libravatar dependabot[bot]4
Bumps [github.com/ulule/limiter/v3](https://github.com/ulule/limiter) from 3.11.0 to 3.11.1. - [Release notes](https://github.com/ulule/limiter/releases) - [Commits](https://github.com/ulule/limiter/compare/v3.11.0...v3.11.1) --- updated-dependencies: - dependency-name: github.com/ulule/limiter/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-13[chore]: Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#1618)Libravatar dependabot[bot]6
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-13[chore]: Bump github.com/abema/go-mp4 from 0.10.0 to 0.10.1 (#1617)Libravatar dependabot[bot]4
Bumps [github.com/abema/go-mp4](https://github.com/abema/go-mp4) from 0.10.0 to 0.10.1. - [Release notes](https://github.com/abema/go-mp4/releases) - [Commits](https://github.com/abema/go-mp4/compare/v0.10.0...v0.10.1) --- updated-dependencies: - dependency-name: github.com/abema/go-mp4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-13[chore]: Bump golang.org/x/image from 0.5.0 to 0.6.0 (#1615)Libravatar dependabot[bot]5
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.5.0 to 0.6.0. - [Release notes](https://github.com/golang/image/releases) - [Commits](https://github.com/golang/image/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: golang.org/x/image dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-13[chore]: Bump codeberg.org/gruf/go-kv from 1.6.0 to 1.6.1 (#1619)Libravatar dependabot[bot]7
Bumps codeberg.org/gruf/go-kv from 1.6.0 to 1.6.1. --- updated-dependencies: - dependency-name: codeberg.org/gruf/go-kv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-12update license headers (#1612)Libravatar f0x5262
2023-03-12[chore] Improve copyright header handling (#1608)Libravatar Daenney784
* [chore] Remove years from all license headers Years or year ranges aren't required in license headers. Many projects have removed them in recent years and it avoids a bit of yearly toil. In many cases our copyright claim was also a bit dodgy since we added the 2021-2023 header to files created after 2021 but you can't claim copyright into the past that way. * [chore] Add license header check This ensures a license header is always added to any new file. This avoids maintainers/reviewers needing to remember to check for and ask for it in case a contribution doesn't include it. * [chore] Add missing license headers * [chore] Further updates to license header * Use the more common // indentend comment format * Remove the hack we had for the linter now that we use the // format * Add SPDX license identifier
2023-03-12[chore] Fix opengraph properties (#1611)Libravatar tobi2
2023-03-11[feature] Support multiple subscriptions on single websocket connection (#1489)Libravatar darrinsmart4
- Allow Oauth authentication on websocket endpoint - Make streamType query parameter optional - Read websocket commands from client and update subscriptions
2023-03-11[frontend/fix] Mobile css tweaks (#1605)Libravatar f0x526
* mobile css tweaks * bulk process list mobile css
2023-03-09[feature] Provide .well-known/host-meta endpoint (#1604)Libravatar Daenney9
* [feature] Provide .well-known/host-meta endpoint This adds the host-meta endpoint as Mastodon clients use this to discover the API domain to use when the host and account domains aren't the same. * Address review comments
2023-03-09[bug] Handle 410 on webfinger properly (#1601)Libravatar Daenney1
When we receive an HTTP 410 on webfinger it means the resource we asked for (the account) is gone, but the endpoint itself responded. In such cases we want to treat the request as successful from a cache (renewal) point of view, while still returning an error from Finger. Follow-up for #1588
2023-03-08[chore] improved enrichAccount() logging (#1602)Libravatar kim1
* slight refactor and improved logging on failed webfinger in enrichAccount() * use correct log format directive --------- Signed-off-by: kim <grufwub@gmail.com>
2023-03-08[feature] Discover webfinger through host-meta (#1588)Libravatar Daenney13
* [feature] Discover webfinger through host-meta This implements a fallback for discovering the webfinger endpoint in case the /.well-known/webfinger endpoint wasn't properly redirected. Some instances do this because the recommendation used to be to use host-meta for the webfinger redirect in the before times. Closes #1558. * [bug] Ensure we only ever update cache on success * [chore] Move finger tests to their own place This adds a test suite for transport and moves the finger cache tests into there instead of abusing the search test suite. * [chore] cleanup the test a bit more We don't really need a separate function for the oddly located webfinger response as we check the full URL string anyway * Address review comments * [chore] update config example * [chore] access DB only through state in controller
2023-03-06[chore] Update uptrace/bun and modernc/sqlite dependencies (#1598)Libravatar tobi84
* [chore] Update bun from 1.1.10 -> 1.1.12 * [chore] bump modernc/sqlite 1.20.4 -> 1.21.0
2023-03-06[bugfix] internal server error on search not found (#1590)Libravatar kim9
* add error value wrapping, include status code / not found flags from transport errors, update error usages Signed-off-by: kim <grufwub@gmail.com> * add code commenting for gtserror functions Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
2023-03-06[feature] Add support for profile fields (#1483)Libravatar zowhoey21
* Add go-playground/form pkg * [feature] Add support for profile fields * Add field attributes test * Validate profile fields form * Add profile field validation tests * Add Field Attributes definition to swagger --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
2023-03-06[chore]: Bump github.com/jackc/pgx/v4 from 4.17.2 to 4.18.1 (#1595)Libravatar dependabot[bot]25
Bumps [github.com/jackc/pgx/v4](https://github.com/jackc/pgx) from 4.17.2 to 4.18.1. - [Release notes](https://github.com/jackc/pgx/releases) - [Changelog](https://github.com/jackc/pgx/blob/v4.18.1/CHANGELOG.md) - [Commits](https://github.com/jackc/pgx/compare/v4.17.2...v4.18.1) --- updated-dependencies: - dependency-name: github.com/jackc/pgx/v4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06[chore]: Bump golang.org/x/oauth2 from 0.5.0 to 0.6.0 (#1597)Libravatar dependabot[bot]3
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.5.0 to 0.6.0. - [Release notes](https://github.com/golang/oauth2/releases) - [Commits](https://github.com/golang/oauth2/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06[chore]: Bump golang.org/x/crypto from 0.6.0 to 0.7.0 (#1593)Libravatar dependabot[bot]94
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/crypto/releases) - [Commits](https://github.com/golang/crypto/compare/v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06[chore]: Bump golang.org/x/text from 0.7.0 to 0.8.0 (#1594)Libravatar dependabot[bot]18
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.7.0 to 0.8.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.7.0...v0.8.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-04[chore] Print human readable config (#1589)Libravatar Daenney2
This changes the config action to print the config in a more human readable format, indented by 4 spaces and with newlines. Thanks to this, we can now reasonably construct some JSON in the envparsing shell script, without needing utilities like jd. It does assume cat is available in order to not change the shebang to bash. With the expected JSON now being one key per line it should make it much easier for multiple PRs that change something around config not to collide in merge conflicts.
2023-03-04[feature] Allow loading TLS certs from disk (#1586)Libravatar Daenney12
Currently, GtS only supports using the built-in LE client directly for TLS. However, admins may still want to use GtS directly (so without a reverse proxy) but with certificates provided through some other mechanism. They may have some centralised way of provisioning these things themselves, or simply prefer to use LE but with a different challenge like DNS-01 which is not supported by autocert. This adds support for loading a public/private keypair from disk instead of using LE and reconfigures the server to use a TLS listener if we succeed in doing so. Additionally, being able to load TLS keypair from disk opens up the path to using a custom CA for testing purposes avoinding the need for a constellation of containers and something like Pebble or Step CA to provide LE APIs.