Commit Graph

3 Commits

Author SHA1 Message Date
Hayden
ce88ed6841 fix: harden server-initiated HTTP against SSRF and DNS rebinding
Route all server-initiated outbound HTTP through one SSRF-protected layer:

- Resolve each host once, validate every resolved address (private,
  loopback, link-local, CGNAT 100.64/10, multicast, reserved, unspecified,
  IPv4-mapped IPv6), and reject if any is unsafe.
- Pin the connection to the validated address via curl's RESOLVE option so
  curl cannot re-resolve to a rebound IP (closes the validate-then-connect
  TOCTOU). Uses getaddrinfo so IPv6 records are checked too.
- Add a sync SafeTransport and safehttp.post, and move the webhook and
  recipe-action paths off raw requests.post so they are guarded like the
  scraper.
- Add HTTP_ALLOW_LIST / HTTP_DISALLOW_LIST settings (deny > allow > default)
  so operators can reach an internal server or block extra hosts.

Apprise notifications egress through the third-party library and are not
covered here.
2026-07-19 21:41:30 -05:00
Michael Genson
a8583c8e69 added backend translation support for plurals 2023-12-09 17:12:07 +00:00
Hayden
7866f0f46e Feature/improve localization (#1147)
* use locale to set language header

* rewrite i18n provider and drop dependency

* rename file

* rename CrudMixin to HttpRepo

* refactor: code-cleanup

* add crowdin source

* remove unused translations

* grab translations from dev branch

* add translation support for foods, units, and labels

* remove rich import
2022-04-10 14:07:35 -08:00