Commit graph

1201 commits

Author SHA1 Message Date
tobi ea22819c7f [chore/bugfix] Demote failed inbox forwarding to warn log rather than error return (#1892) 2023-06-14 15:26:08 +02:00
tobi dca7a81d80 [chore] Refactor AP authentication, other small bits of tidying up (#1874) 2023-06-14 15:26:00 +02:00
Daenney 45865dd55a [docs] Add certificates and firewalling to advanced (#1888)
* [docs] Add a certificates guide in Advanced

This adds some documentation about the process of getting certificates
through ACME in general. It also provides a number of links to
alternative clients and certbot deployment guides that are up to date.

Slightly restructure the NGINX and Apache reverse proxy documentation
and insert mentions to the Provisioning TLS certificates advanced
documentation in them.

* [docs] Add firewall section in Advanced

* [docs] Add new guides to section indexes

* [docs] Fix spelling issue

* [docs] Fix a few typos
2023-06-14 15:23:40 +02:00
f0x52 63cf1603ac [Frontend] Settings for profile fields (#1885)
* get max emoji size from instance settings

* expose (hardcoded) max amount of profile fields in instance api

* basic profile field setting

* fix profile field hook structure for updates

* *twirls mustache* fix ze tests

---------

Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2023-06-14 15:23:33 +02:00
Daenney e99f230da4 [docs] Made Advanced its own section (#1883)
* [docs] Made Advanced its own section

This splits the Advanced page off from the Getting Started guide and
makes it its own thing. It now has some additional sub-sections for
bigger topics like caching and enhanced security. This also moves
tracing from Getting Started to Advanced as that feels like a more
appropriate location for it.

The enhanced security looks a little silly with a single section, but I
have guides pending for firewall configurations and I'd also like to
consolidate our how to provision TLS certificates in there as we repeat
this information multiple times.

* [docs] Fix all my spelling errors

* [docs] Inline the links in sandboxing
2023-06-14 15:23:26 +02:00
dependabot[bot] 41ee7432c5 [chore]: Bump modernc.org/sqlite from 1.23.0 to 1.23.1 (#1884)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.23.0 to 1.23.1.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.23.0...v1.23.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-06-14 15:23:20 +02:00
Daenney 6dbb85c8a0 [docs] Revamp the installation guide (#1877)
This tries to revamp/restructure the installation guide. It's renamed to
"Getting Started" as it now contains a few more things than just the
installation, especially the deployment considerations which we didn't
use to spell out as much ahead of time.

Installation is now a section with the guides on their own. I've removed
a bit of redundancy like the user creation. I also removed the rogue
reverse proxy section in the Docker guide and lifted that into the
reverse proxy section.
2023-06-14 15:23:06 +02:00
Daenney ed1fb47c0c [docs] Add example tracing infrastructure (#1866)
This adds an example on how to get Grafana Tempo up to receive spans as
well as Grafana itself to view them.

I've added this as a separate Tracing doc in the installation guide as
the Advanced one was starting to get rather full.

Fixes: #1791
2023-06-14 15:22:57 +02:00
tobi 51abd65d04 [chore] update latest deps, ensure readme up to date (#1873)
* [chore] update latest deps, ensure readme up to date

* remove double entry
2023-06-14 15:22:50 +02:00
dependabot[bot] 1cffd171dd [chore]: Bump github.com/minio/minio-go/v7 from 7.0.55 to 7.0.56 (#1869)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.55 to 7.0.56.
- [Release notes](https://github.com/minio/minio-go/releases)
- [Commits](https://github.com/minio/minio-go/compare/v7.0.55...v7.0.56)

---
updated-dependencies:
- dependency-name: github.com/minio/minio-go/v7
  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-06-14 15:22:45 +02:00
dependabot[bot] 4bf8015b28 [chore]: Bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#1872)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4)

---
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-06-14 15:22:38 +02:00
tobi 9e8da5e1f0 [bugfix] Fix slow joined home timeline query (#1867) 2023-06-14 15:22:31 +02:00
Daenney d9d0c66899 [bugfix/docs] AppArmor profile for SQLite (#1864)
Our default configuration places the SQLite DB in /gotosocial/, but the
AppArmor profile doesn't allow us to write there. Instead of making the
whole directory writable, add a writable area in /gotosocial/db/ instead
and advise in the docs to move the DB there.
2023-06-14 15:22:18 +02:00
Daenney c4905ef728 [docs] Add Repology stats (#1859)
Instead of a manually curated list of distribution packages, this adds
the Repology[1] widget instead.

This also separates out the distribution packages from the
self-hosting/deployment options into their own sections.

[1]: https://repology.org/project/gotosocial/versions
2023-06-14 15:20:06 +02:00
tobi d472085e56 [chore] Update versions, fix lint errors (#1860) 2023-06-14 15:19:58 +02:00
Julian-Samuel Gebühr 457eed4d2a [bugfix] Allow lowercase emoji shortcode in frontend (#1851)
* Replace pinafore with semaphore

* Typo

* Allow lowercase emoji shortcode in frontend

* Fix failing test (corrected expected outcome)
2023-06-14 15:19:41 +02:00
tobi 6e41c11238 [bugfix] Overwrite API client closed errors with 499 - Client Closed Request (#1857)
* [bugfix] Overwrite client closed errors with 499

* bleep bloop

* review changes
2023-06-14 15:19:33 +02:00
kim 86cbdac36f [performance] wrap httpclient response body to ensure drained before close (#1854)
Signed-off-by: kim <grufwub@gmail.com>
2023-06-14 15:19:28 +02:00
dependabot[bot] 5b884175a0 [chore]: Bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#1855)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 15:19:15 +02:00
tobi e3e9ce360f [chore/frontend] refactor header templating, add apple-touch-icon (#1850) 2023-06-14 15:19:08 +02:00
kim 07e1fee117 [bugfix] only attempt to populate account/statuses from DB if already exist (#1839)
* only attempt to populate account/statuses from DB if already up-to-date

Signed-off-by: kim <grufwub@gmail.com>

* add missing status is-up-to-date check :grimace: + ensure populated if so

Signed-off-by: kim <grufwub@gmail.com>

---------

Signed-off-by: kim <grufwub@gmail.com>
2023-06-14 15:19:02 +02:00
tobi 1a327f0371 [docs] clarify other federation modes not yet implemented (#1849) 2023-06-14 15:18:44 +02:00
Julian-Samuel Gebühr 5d7648de3c [fix] Fix link to remote emoji pgae (#1845)
* Replace pinafore with semaphore

* Typo

* Fix remote emoji link
2023-06-14 15:18:39 +02:00
dependabot[bot] ef0d0b65fb [chore]: Bump github.com/microcosm-cc/bluemonday from 1.0.23 to 1.0.24 (#1843)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 15:18:34 +02:00
dependabot[bot] 498037a04d [chore]: Bump github.com/coreos/go-oidc/v3 from 3.5.0 to 3.6.0 (#1840)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 15:18:28 +02:00
dependabot[bot] f12a433352 [chore]: Bump github.com/ulule/limiter/v3 from 3.11.1 to 3.11.2 (#1841)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 15:18:21 +02:00
dependabot[bot] 975a30cfa9 [chore]: Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (#1842)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 15:18:16 +02:00
dependabot[bot] 212656ab8e [chore]: Bump github.com/minio/minio-go/v7 from 7.0.53 to 7.0.55 (#1844)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-14 15:18:11 +02:00
tobi 045c279d47 [bugfix/chore] Inbox post updates (#1821)
Co-authored-by: kim <grufwub@gmail.com>
2023-06-14 15:18:04 +02:00
kim 94792ff7e8 [chore] tidy up media manager, add calling func to errors, build-script improvements (#1835)
* media manager tidy-up: de-interface and remove unused PostDataFunc

Signed-off-by: kim <grufwub@gmail.com>

* remove last traces of media.Manager being an interface

Signed-off-by: kim <grufwub@gmail.com>

* update error to provide caller, allow tuneable via build tags

Signed-off-by: kim <grufwub@gmail.com>

* remove kim-specific build script changes

Signed-off-by: kim <grufwub@gmail.com>

* fix merge conflicts

Signed-off-by: kim <grufwub@gmail.com>

* update build-script to support externally setting build variables

Signed-off-by: kim <grufwub@gmail.com>

---------

Signed-off-by: kim <grufwub@gmail.com>
2023-06-14 15:16:43 +02:00
tobi 949a1f5438 [docs] Update + simplify roadmap, revise beta estimate (#1826) 2023-06-14 15:14:37 +02:00
decentral1se eecd7013ec [docs]: semaphone ref & DEBUG usage for standalone testing (#1828)
* Point to semaphore for local testing
* Use `DEBUG=1` when running the testrig
* Provide an approach for install yarn

Co-authored-by: decentral1se <cellarspoon@riseup.net>
2023-06-14 15:14:27 +02:00
Daenney 238a607bb0 [bugfix/docs] Fix clear notifications API docs (#1831)
The handler is already hooked to the right path, it's just the docs that
were missing the path.
2023-06-14 15:14:20 +02:00
decentral1se a206230934 [bugfix] allow usernames of length 1 (#1823)
Closes https://github.com/superseriousbusiness/gotosocial/issues/1691.

Co-authored-by: decentral1se <cellarspoon@riseup.net>
2023-06-14 15:13:53 +02:00
decentral1se 282be6f26d
[docs] local docs hacking howto (#1816)
Co-authored-by: decentral1se <cellarspoon@riseup.net>
2023-05-23 17:38:39 +02:00
decentral1se d0e747cd58
[docs] code highlighting configuration (#1817)
Co-authored-by: decentral1se <cellarspoon@riseup.net>
2023-05-23 17:04:00 +02:00
decentral1se 999a6ae437
[docs] support copy/pasta for code blocks (#1818)
Co-authored-by: decentral1se <cellarspoon@riseup.net>
2023-05-23 11:51:43 +02:00
dependabot[bot] a0952adc40
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.52 to 7.0.53 (#1808)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.52 to 7.0.53.
- [Release notes](https://github.com/minio/minio-go/releases)
- [Commits](https://github.com/minio/minio-go/compare/v7.0.52...v7.0.53)

---
updated-dependencies:
- dependency-name: github.com/minio/minio-go/v7
  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-05-22 20:05:27 +02:00
tobi c48abd8bc0
[chore] update account statuses paging logic (#1814) 2023-05-22 16:32:36 +02:00
dependabot[bot] ea1bbacf4b
[chore]: Bump github.com/go-playground/validator/v10 (#1812)
Bumps [github.com/go-playground/validator/v10](https://github.com/go-playground/validator) from 10.13.0 to 10.14.0.
- [Release notes](https://github.com/go-playground/validator/releases)
- [Commits](https://github.com/go-playground/validator/compare/v10.13.0...v10.14.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-05-22 09:17:48 +02:00
Julian-Samuel Gebühr 9c24dee01f
[chore] Replace pinafore with semaphore (#1801)
* Replace pinafore with semaphore

* Typo
2023-05-21 22:40:43 +02:00
kim 2063d01cdb
[bugfix] Add back removed ValidateRequest() before backoff-retry loop (#1805)
* add back removed ValidateRequest() before backoff-retry loop

Signed-off-by: kim <grufwub@gmail.com>

* include response body in error response log

Signed-off-by: kim <grufwub@gmail.com>

* improved error response body draining

Signed-off-by: kim <grufwub@gmail.com>

* add more code commenting

Signed-off-by: kim <grufwub@gmail.com>

* move new error response logic to gtserror, handle instead in transport.Transport{} impl

Signed-off-by: kim <grufwub@gmail.com>

* appease ye oh mighty linter

Signed-off-by: kim <grufwub@gmail.com>

* fix mockhttpclient not setting request in http response

Signed-off-by: kim <grufwub@gmail.com>

---------

Signed-off-by: kim <grufwub@gmail.com>
2023-05-21 18:59:14 +02:00
Daenney 107237c8e8
[feature] Make client IP logging configurable (#1799) 2023-05-21 16:12:47 +01:00
tobi 68e54cbaa4
[bugfix] Start + stop caches properly for testrig + pruning (#1804)
* [bugfix] Start + stop caches properly for testrig + pruning

* go fmt ./...
2023-05-21 14:44:10 +02:00
tobi 99ddaba57e
[bugfix] Fix incorrect default for empty emoji domain (#1803) 2023-05-21 13:45:24 +02:00
Daenney c7702c47bb
[chore] Change time comparison in webfinger test (#1798)
Every now and then the TestFingerWithHostMetaCacheStrategy would fail on
a time related error. I suspect suite.Equal doesn't quite work as
expected when given two time.Time's, so instead explicitly check with
the time.Equal.
2023-05-16 15:09:29 +02:00
Daenney e91cabb704
[bugfix] Fix NegotiateFormat with multiple accept headers (#1797)
* [bugfix] Fix NegotiateAccept with multi accept

There's a bug in Gin's NegotiateFormat that doesn't handle the presence
of multilpe accept headers. This lifts the code from the PR @tsmethurst
sent a year ago to Gin into our codebase to fix the issue.

* [bugfix] Concat accept header in webfinger

Some implementations bug out when there's multiple accept headers,
including Gin (see 7050112af1). But things
seem to work reliably with a single accept header with multiple parts.

Fixes: #1793
2023-05-16 15:08:45 +02:00
Daenney 2478d83c84
[bugfix] Fix proxy_pass in named location (#1794)
A proxy_pass in a named location, @name, should not include a trailing
slash.
2023-05-15 19:53:42 +02:00
tobi 19dab83ee3
[docs] add missing observability settings to example config (#1790) 2023-05-15 14:17:04 +02:00
tobi 32aefd55b2
[docs] remove nginx trailing slash (#1789) 2023-05-15 14:07:19 +02:00