Commit graph

2262 commits

Author SHA1 Message Date
dependabot[bot] acd3e80ae1
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.81 to 7.0.84 (#3728)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.81 to 7.0.84.
- [Release notes](https://github.com/minio/minio-go/releases)
- [Commits](https://github.com/minio/minio-go/compare/v7.0.81...v7.0.84)

---
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>
2025-02-03 10:39:40 +00:00
Vyr Cossont 27844b7da2
[feature] Implement Web Push notification policy (#3721)
* Web Push: add policy column to subscriptions

* Web Push: add policy to API

* Web Push: test notification policy

* go-fmt unrelated file (how did this get thru?)
2025-02-03 10:25:53 +00:00
dependabot[bot] 8b74cad422
[chore]: Bump github.com/tdewolff/minify/v2 from 2.21.2 to 2.21.3 (#3727)
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.21.2 to 2.21.3.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.21.2...v2.21.3)

---
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>
2025-02-03 10:12:49 +00:00
dependabot[bot] c086d4048c
[chore]: Bump github.com/KimMachineGun/automemlimit from 0.6.1 to 0.7.0 (#3726)
Bumps [github.com/KimMachineGun/automemlimit](https://github.com/KimMachineGun/automemlimit) from 0.6.1 to 0.7.0.
- [Release notes](https://github.com/KimMachineGun/automemlimit/releases)
- [Commits](https://github.com/KimMachineGun/automemlimit/compare/v0.6.1...v0.7.0)

---
updated-dependencies:
- dependency-name: github.com/KimMachineGun/automemlimit
  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>
2025-02-03 10:12:35 +00:00
dependabot[bot] a6d852d1c5
[chore]: Bump golang.org/x/oauth2 from 0.24.0 to 0.25.0 (#3725)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.24.0...v0.25.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>
2025-02-03 10:11:55 +00:00
jade arson. 77f25e21d7
[chore] disallow /nodeinfo/ too (#3729) 2025-02-03 10:09:14 +01:00
Vyr Cossont f5eee56bb1
[bugfix] Swagger: fix media_ids[] param for creating statuses (#3722) 2025-02-01 17:14:49 -08:00
tobi a55bd6d2bd
[feature] Add instance-stats-randomize config option (#3718)
* [feature] Add `instance-stats-randomize` config option

* don't use cache (overkill)
2025-01-31 19:27:18 +01:00
tobi c47b9bd1d1
[chore] Add "object" uri to outgoing Accept + Reject messages (#3717) 2025-01-31 17:09:11 +01:00
Vyr Cossont fc895ade02
[chore] Web Push: Use server URL for VAPID sub claim (#3716)
webpush-go now supports sending `https://` as well as `mailto:` URLs for VAPID sub claims, so we can revert 464d920cfd now and save fetching the instance contact email or making up a dummy email if there wasn't one configured.
2025-01-31 14:57:32 +00:00
tobi 8a9422aa78
[bugfix] shut down LE server nicely (#3714)
* [bugfix] shut down LE server nicely
2025-01-31 13:45:39 +01:00
Vyr Cossont b9e0689359
[bugfix] Extend parser to handle more non-Latin hashtags (#3700)
* Allow marks after NFC normalization

Includes regression test for the Tamil example from #3618

* Disallow just numbers + marks + underscore as hashtag
2025-01-31 11:42:55 +01:00
Vyr Cossont ab758cc233
[feature] Add system message wrappers for pending replies and placeholder attachments (#3713)
Fixes #3712
2025-01-31 11:40:39 +01:00
kim 493de5c005
[bugfix] fix boost of account ID check (#3709) 2025-01-30 18:14:35 +01:00
kim 527587155a
check boosted account ID when performing usermute checks (#3708) 2025-01-30 15:05:15 +00:00
Marcus Jaschen b3ecfe1e0a
[docs] remove -X POST from curl commands (#3665)
Daniel, author of curl, explains why `-X POST` is not
necessary and considered bad behavior:

https://daniel.haxx.se/blog/2015/09/11/unnecessary-use-of-curl-x/ for
2025-01-30 13:56:08 +01:00
kim 91cef3495d
[bugfix] Missing emoji urls (#3707)
* filter out emoji that are uncached when converting to frontend models

* some very small fixups

* remove TODO notice
2025-01-30 13:52:03 +01:00
kim 1ab960bf15
[bugfix] harden checks for remotes masquerading as local, and return correct local account redirects early (#3706) 2025-01-30 10:40:21 +01:00
tobi d16e4fa34d
[feature] Use maintenance router to serve 503 while server is starting/migrating (#3705)
* [feature] Use maintenance router to serve 503 while server is starting/migrating

* love you linter, kissies
2025-01-29 16:57:04 +01:00
kim 61141ac232
[chore] remove type switch in Create() and instead move to FederatedCallbacks() (#3697)
* remove type switch in Create() and instead move to FederatedCallbacks()

* add missing (my bad!) federating wrapped callbacks behaviour

* add missing license header 😇

* fix create flag test to use correct function
2025-01-28 20:22:23 +00:00
tobi bfe8144fda
[bugfix] Allow processing null ID emojis (#3702)
* [bugfix] Allow processing null ID emojis

* document emojis

* blah

* typo

* array thingy
2025-01-28 13:32:37 +01:00
tobi 65fb8abd42
[feature] Implement deliveryRecipientPreSort to prioritize delivery to mentioned accounts (#3668)
* weeeeenus

* update to latest activity

* update to use latest release tag of superseriousbusiness/activity

---------

Co-authored-by: kim <grufwub@gmail.com>
2025-01-27 19:22:15 +01:00
tobi 9048290948
[chore] skip trusted-proxies warning if ip excepted from rate limiting (#3699)
* [chore] skip `trusted-proxies` warning if ip excepted from rate limiting

* weep

* typo

* fix env parsing test
2025-01-27 19:21:13 +01:00
kim 726d2ba483
[chore] some tidy ups (#3677)
* small formatting changes (no logic)

* improve code comments

* fix import cycle

* shutup stinky linter
2025-01-27 15:54:59 +00:00
kim 3617e27afa
bumps uptrace/bun deps to v1.2.8 (#3698) 2025-01-27 15:54:51 +00:00
Vivian Lim ⭐ 7b7fc528f1
[feature/frontend] Add login button to index page which reiterates info about clients (#3377)
* Add login button to index page which reiterates info about clients

* bit of CSS fiddling, move apps from front page to login info

* fix indentation

---------

Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2025-01-27 14:24:31 +01:00
tobi 702d49207f
[bugfix] Fix top-level posts with a mention being counted as replies when doing exclude_replies (#3689)
* [bugfix] Fix top-level posts with a mention being counted as replies

* add index for new reply exclusion query
2025-01-27 11:10:18 +00:00
dependabot[bot] a773768718
[chore]: Bump github.com/SherClockHolmes/webpush-go from 1.3.0 to 1.4.0 (#3694)
Bumps [github.com/SherClockHolmes/webpush-go](https://github.com/SherClockHolmes/webpush-go) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/SherClockHolmes/webpush-go/releases)
- [Commits](https://github.com/SherClockHolmes/webpush-go/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/SherClockHolmes/webpush-go
  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>
2025-01-27 11:08:13 +00:00
dependabot[bot] 3428bc9633
[chore]: Bump github.com/miekg/dns from 1.1.62 to 1.1.63 (#3695)
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.62 to 1.1.63.
- [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release)
- [Commits](https://github.com/miekg/dns/compare/v1.1.62...v1.1.63)

---
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>
2025-01-27 11:07:16 +00:00
dependabot[bot] 5c96702cb5
[chore]: Bump github.com/gin-contrib/gzip from 1.1.0 to 1.2.2 (#3693)
Bumps [github.com/gin-contrib/gzip](https://github.com/gin-contrib/gzip) from 1.1.0 to 1.2.2.
- [Release notes](https://github.com/gin-contrib/gzip/releases)
- [Changelog](https://github.com/gin-contrib/gzip/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/gzip/compare/v1.1.0...v1.2.2)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/gzip
  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>
2025-01-27 11:06:46 +00:00
tobi 2a46681147
[chore] Allow suppressing trusted-proxies warning by disabling rate limiting (#3686) 2025-01-26 11:21:57 +00:00
Vyr Cossont 3ab2d8621b
[docs] Swagger: fix filter context params by moving enum list from the list type to the item type (#3684)
Reported by `@modulus:matrix.org`
2025-01-26 09:51:28 +01:00
tobi 4c052c85f5
[bugfix] Rename domain perm sub migration to unique date (#3679)
* [bugfix] Rename domain perm sub migration to unique date

* add repeat migration
2025-01-24 18:09:55 +01:00
tobi 71b50353eb
[feature] Process incoming Undo Announce properly (#3676)
* [feature] Process incoming Undo Announce properly

* test undo announce
2025-01-24 17:36:34 +01:00
kim 3720251fca
[feature] show status edits on frontend (#3678)
* add 'edited-at' field to status info web template

* make the edited-at text italic

* small change in phrasing
2025-01-24 16:02:13 +01:00
Vyr Cossont 5b765d734e
[feature] Push notifications (#3587)
* Update push subscription API model to be Mastodon 4.0 compatible

* Add webpush-go dependency

# Conflicts:
#	go.sum

* Single-row table for storing instance's VAPID key pair

* Generate VAPID key pair during startup

* Add VAPID public key to instance info API

* Return VAPID public key when registering an app

* Store Web Push subscriptions in DB

* Add Web Push sender (similar to email sender)

* Add no-op push senders to most processor tests

* Test Web Push notifications from workers

* Delete Web Push subscriptions when account is deleted

* Implement push subscription API

* Linter fixes

* Update Swagger

* Fix enum to int migration

* Fix GetVAPIDKeyPair

* Create web push subscriptions table with indexes

* Log Web Push server error messages

* Send instance URL as Web Push JWT subject

* Accept any 2xx code as a success

* Fix malformed VAPID sub claim

* Use packed notification flags

* Remove unused date columns

* Add notification type for update notifications

Not used yet

* Make GetVAPIDKeyPair idempotent

and remove PutVAPIDKeyPair

* Post-rebase fixes

* go mod tidy

* Special-case 400 errors other than 408/429

Most client errors should remove the subscription.

* Improve titles, trim body to reasonable length

* Disallow cleartext HTTP for Web Push servers

* Fix lint

* Remove redundant index on unique column

Also removes redundant unique and notnull tags on ID column since these are implied by pk

* Make realsender.go more readable

* Use Tobi's style for wrapping errors

* Restore treating all 5xx codes as temporary problems

* Always load target account settings

* Stub `policy` and `standard`

* webpush.Sender: take type converter as ctor param

* Move webpush.MockSender and noopSender into testrig
2025-01-23 16:47:30 -08:00
tobi 9333bbc4d0
[feature] Serve bot accounts over AP as Service instead of Person (#3672)
* pepis

* oopsie doopsie

* bollocks
2025-01-23 18:18:23 +01:00
tobi b42cb7a802
[feature] Add warning about trusted-proxies to make config easier (#3675)
* [feature] Add warning about `trusted-proxies` to make config easier

* thank you linter, hugs and kisses to you
2025-01-23 15:48:09 +01:00
tobi 1472d92a8d
[feature] Add published property to outgoing AP Actor representations (#3671) 2025-01-23 14:42:31 +00:00
kim 0a99901c65
[performance] reduce InboxForward->Create calls by partially implementing Exists() (#3647)
* alphabetical reordering

* keep a cache of activity IDs we have handled creates for

* reduce number of inbox forwarding create calls by partially implementing Exists()

* increase cache size, since all we're storing is string keys
2025-01-22 13:42:12 +01:00
dependabot[bot] 5c0514e83c
[chore]: Bump github.com/coreos/go-oidc/v3 from 3.11.0 to 3.12.0 (#3662) 2025-01-20 10:15:27 +00:00
tobi 37fd7c7a6a
[bugfix] Store LastModified for domain perm subs + send as If-Modified-Since (#3655) 2025-01-20 10:56:00 +01:00
dependabot[bot] 9835d3e65d
[chore]: Bump github.com/gin-contrib/cors from 1.7.2 to 1.7.3 (#3661) 2025-01-20 09:47:07 +00:00
dependabot[bot] 77ea30542b
[chore]: Bump golang.org/x/net from 0.33.0 to 0.34.0 (#3660) 2025-01-20 09:03:10 +00:00
dependabot[bot] cfe6ac5a42
[chore]: Bump github.com/jackc/pgx/v5 from 5.7.1 to 5.7.2 (#3663)
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.7.1 to 5.7.2.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  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>
2025-01-20 10:01:46 +01:00
dependabot[bot] 0096222c0e
[chore]: Bump github.com/gin-contrib/sessions from 1.0.1 to 1.0.2 (#3664)
Bumps [github.com/gin-contrib/sessions](https://github.com/gin-contrib/sessions) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/gin-contrib/sessions/releases)
- [Changelog](https://github.com/gin-contrib/sessions/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/sessions/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/sessions
  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>
2025-01-20 10:01:17 +01:00
tobi 634d4f408f
[bugfix] Fix existing perm adoption (#3651)
* [bugfix] Fix existing perm adoption

* go fmt

* test, small log fix
2025-01-18 18:55:27 +01:00
kim 81b66ad7e3
update ncruces/go-sqlite3 v0.21.3 -> v0.22.0, gruf/go-ffmpreg v0.6.4 -> v0.6.5 (#3646) 2025-01-14 18:30:55 +00:00
kim b8ef9fc4bc
bump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645) 2025-01-14 14:23:28 +00:00
kim e77c7e16b6
[chore] better dns validation (#3644)
* add seperate PunifyValidate() function for properly validating domain names when converting to punycode

* rename function, strip port from domain validation
2025-01-14 14:23:18 +00:00