refactor(backend): validate numeric IDs and use url.Values for upstream URLs #2

Merged
starkSV merged 1 commit from improve-backend-url-encoding into main 2026-05-12 19:09:32 +05:30

1 commit

Author SHA1 Message Date
Shekhar Vaidya
37f947cb32 refactor(backend): validate numeric IDs and use url.Values for upstream URLs
- Reject non-numeric product_id and sku_id with HTTP 400 before any
  upstream request is made, preventing parameter injection into
  Microsoft API query strings.
- Replace all fmt.Sprintf URL construction with url.Values.Set +
  .Encode() across handleSkuInfo, handleProxy, and setupSession,
  ensuring values are always percent-encoded correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 19:00:09 +05:30