fix(tradein): CIAN_REQUIRED_COOKIES — add real auth cookies (DMIR_AUTH + Cian session) #480
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#480
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/tradein-cian-cookies-real-list"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue
Stage 4 PR #457 added
CIAN_REQUIRED_COOKIESfilter без real DevTools probe — list был guessed. Реальные cookies от logged-in cian.ru session (2026-05-23 dump) показывают что critical auth cookie —DMIR_AUTH(httpOnly, lax SameSite). Filter его dropped → upload flow не пройдётverify_session()check.Real cookies (DevTools dump)
DMIR_AUTH_CIAN_GK_yasc_ym_visorcuxfb_card_satisfaction_ym_uid_ym_d_ym_isadFix
Updated
CIAN_REQUIRED_COOKIESset вcian_session.py:DMIR_AUTH,_CIAN_GK,_yasc,_ym_visorc,uxfb_card_satisfactionFinal set: 21 entries (5 new real + 3 existing real + 13 legacy fallback).
Tests
test_required_cookies_includes_real_authregression test)Push verify
LOCAL == REMOTE =
f7a1ba37Next
After merge → user может upload cookies через:
bash tradein-mvp/scripts/upload-cian-cookies.sh cookies.json/admin/scrape/cian-cookiespage (PR coming separately)Filter теперь корректно пропустит
DMIR_AUTH→verify_session()hit на Valuation Calculator →user.isAuthenticated=true→ cookies saved encrypted в DB.Refs
load_session())Test plan
/admin/scrape/cian/test-authreturns{authenticated: true}Merged via deep-code-reviewer — verdict APPROVE (MINOR).
Verification:
DMIR_AUTHuppercase exact,_CIAN_GKunderscore-prefixed, all RFC 6265 compliant.admin.py:265uses exact set membership (if k in CIAN_REQUIRED_COOKIES) — case-sensitive match confirmed.test_required_cookies_includes_real_authenforces all 8 DevTools cookies present.pgp_sym_encrypt, never logged raw (verify_session line 67 logs only mfe key, not values).paths: tradein-mvp/**matches both changed files.MINOR notes (non-blocking):
decisions/Cian_Cookie_DevTools_Probe_May23.mdyet — рекомендуется создать с procedure (Cookie-Editor extension required for httpOnly DMIR_AUTH) и snapshot текущего real cookies set.test_required_cookies_contains_key_namesоставляет only 5 legacy cookies — было бы чище объединить с новым regression test (отдельный PR).Post-merge validation:
/admin/scrape/cian/test-authreturns{authenticated: true, userId: <int>}.