You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
euniceamoni
authored
fix(gdpr): send export email in POST body, not GET query string (#1235)
* fix(gdpr): send export email in POST body, not GET query string
PII (email address) was being sent as a URL query parameter on
GET /api/v1/newsletter/gdpr/export, exposing it to server access
logs, browser history, and proxy logs.
Changes:
- frontend: newsletterGdprExport now uses POST with body: { email }
instead of GET with params: { email } (client.ts)
- backend: added NewsletterExportBody struct, changed handler extractor
from Query to Json, updated utoipa path attribute to post,
updated route registration from get() to post() (handlers.rs, main.rs)
- tests: updated it.each entry to expect POST; added new test in
'GDPR export (#1156)' describe block asserting email is in the
request body and absent from the URL
Fixes#1156
* fix(openapi): update GDPR export spec and contract test to POST
Update openapi.yaml /api/v1/newsletter/gdpr/export from GET with
query parameter to POST with requestBody (EmailRequest schema), matching
the handler change in handlers.rs.
Update SPEC_ROUTES in openapi_contract_test.rs from GET to POST to
keep the contract test in sync with the spec and runtime router.
0 commit comments