Merge pull request 'fix(tradein): skip TLS verify for sberindex.ru pull — server omits LE intermediate (#922)' (#924) from fix/922-sber-tls-verify into main
Some checks failed
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / test (push) Has been cancelled
Deploy Trade-In / build-backend (push) Blocked by required conditions
Deploy Trade-In / deploy (push) Blocked by required conditions
Deploy Trade-In / changes (push) Successful in 5s
Deploy Trade-In / build-browser (push) Has been skipped

Reviewed-on: #924
This commit is contained in:
lekss361 2026-05-31 19:34:24 +00:00
commit a5457af716

View file

@ -307,7 +307,14 @@ async def pull_sber_indices(
counters: dict[str, int] = {"upserted": 0, "skipped": 0, "errors": 0}
async with httpx.AsyncClient(timeout=SBER_HTTP_TIMEOUT) as client:
# #922: sberindex.ru serves an INCOMPLETE TLS chain — it sends only the leaf
# certificate and omits the Let's Encrypt intermediate (R13), so cert
# verification fails with "unable to get local issuer certificate" (verify
# code 21) even against a full system/certifi trust store. This is a
# server-side misconfiguration outside our control. The endpoint is public,
# unauthenticated, non-sensitive open data, so we skip TLS verification here
# rather than pin a Let's Encrypt intermediate that rotates (R10R14+).
async with httpx.AsyncClient(timeout=SBER_HTTP_TIMEOUT, verify=False) as client:
for ref_area, _city_hint in cities.items():
for dashboard in dashboards:
try: