Marc-André Bombeck
a1ffa497f1
fix(security): Withings webhook secret as URL path segment, not query string
...
Move the Withings webhook shared secret from `?secret=…` to a path
segment (`/api/withings/webhook/<secret>`) so it never lands in the
reverse-proxy `query_string` access-log column or GlitchTip URL/
breadcrumb capture surface (W10 finding M-2).
Withings has no facility for custom HTTP headers on outgoing
notifications and never signs the body — every Notify.subscribe call
accepts only action/callbackurl/appli/client_id/nonce/signature, so
the callback URL is the only authenticity surface a subscriber
controls. Path-segment binding is the largest practical shift away
from loggable query strings that Withings supports end-to-end.
The legacy `/api/withings/webhook` route stays alive for one release
cycle (removal target: v1.4.27) so existing subscriptions keep
delivering. The query-string path now emits a deprecation breadcrumb
on every hit. Active users re-subscribe organically when they reconnect
for the v1.4.25 `user.activity` OAuth-scope upgrade.
Tests: 8 new for the path-segment route (valid / invalid / missing /
unset-env / prefix-match / rate-limited / HEAD / GET), 3 new for
`getWithingsWebhookCallbackUrl()`. Existing legacy-route tests
continue to pass over the refactored shared helper.
2026-05-14 17:46:25 +02:00
..
2026-05-14 17:06:43 +02:00
2026-05-11 02:44:12 +02:00
2026-05-12 22:45:42 +02:00
2026-05-10 12:51:33 +02:00
2026-05-09 16:06:52 +02:00
2026-05-09 16:08:20 +02:00
2026-05-09 18:08:25 +02:00
2026-05-09 18:08:25 +02:00
2026-05-09 17:02:59 +02:00
2026-05-09 18:08:25 +02:00
2026-05-09 18:08:25 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 13:02:39 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 13:12:11 +02:00
2026-05-10 13:15:14 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 13:00:11 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 13:16:19 +02:00
2026-05-10 11:09:41 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 14:01:38 +02:00
2026-05-10 11:09:41 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 17:24:59 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 00:29:22 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 11:09:41 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 11:09:41 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 18:17:55 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 14:55:27 +02:00
2026-05-10 15:17:03 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 19:31:20 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-14 14:19:08 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-14 14:19:08 +02:00
2026-05-14 14:19:08 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-14 14:19:08 +02:00
2026-05-14 14:19:08 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:27:51 +02:00
2026-05-14 14:19:08 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:28:02 +02:00
2026-05-12 22:33:35 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:28:02 +02:00
2026-05-11 08:28:02 +02:00
2026-05-14 14:19:08 +02:00
2026-05-14 14:19:08 +02:00
2026-05-14 14:19:08 +02:00
2026-05-14 16:07:50 +02:00
2026-05-14 14:19:08 +02:00
2026-05-14 15:55:42 +02:00
2026-05-14 17:46:25 +02:00
2026-05-10 11:09:41 +02:00
2026-05-09 01:22:09 +02:00
2026-05-14 14:19:08 +02:00
2026-05-14 11:32:28 +02:00
2026-05-12 22:45:42 +02:00
2026-05-09 17:57:30 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 11:09:41 +02:00
2026-05-10 13:12:11 +02:00
2026-05-10 11:10:59 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-11 08:27:51 +02:00
2026-05-12 22:33:35 +02:00
2026-05-14 14:22:17 +02:00