gitforge/modules/activitypub
forgejo-backport-action 111902490d [v16.0/forgejo] federation: protect against SSRF attacks (#13351)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/11795

Adds an extra check to ensure the `keyId` and `actorId` included in signed requests and actor records point back to the originating host.  This check prevents server-side request forgery (SSRF) attacks where a carefully crafted request could be used to trick a federation server into making requests to arbitrary hosts and ports.

### Tests for Go changes

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I ran...
  - [x] `make pr-go` before pushing

Co-authored-by: elle <0xllx0@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13351
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-07-08 20:33:12 +02:00
..
client.go [v16.0/forgejo] federation: protect against SSRF attacks (#13351) 2026-07-08 20:33:12 +02:00
client_test.go [v16.0/forgejo] federation: protect against SSRF attacks (#13351) 2026-07-08 20:33:12 +02:00
main_test.go feat: backend DB model for fine-grained repo access tokens 2026-02-27 17:17:29 +01:00
user_settings.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
user_settings_test.go chore: move all test blank imports in a single package (#10662) 2026-01-02 05:32:32 +01:00