Repository navigation
fix(flow): parse prefixed routes with denylists and refine login - #48
Conversation
- Strip Flow host, account, and org prefixes in route allowlists. - Detect /about, /flow, and /flow/about across all route prefixes. - Read FLOW_APP_CONFIG and CHECK_TOOL_AVAILABILITY from QueryCache. - Send authuser and pageId on batched cPZSdc and KV2T2d fallbacks. - Reject JSPB 0, false, sparse 31/32 flags, and KV2T2d codes 4-8. - Require Google cookies, Flow cookies, and History URL on login. - Keep LoginChrome open on status polls and keep active Flow URLs.
|
Changes requested. Keep this PR as the route and sign-in PR. I close #41, which overlaps with it. The point 1 below blocks the merge.
Take the useful parts of #41 (batch probes of |
- Parse URL paths in project_id_from_url and is_project_subroute_url - Keep polling across Flow SSO redirect routes during login promotion - Do not open a second login window when verification fails - Detect Google auth cookies from Cookies without requiring History - Reject only verified KV2T2d code 7 in check_auth - Move shared route and Angular query helpers to leaf modules
|
Addressed all 6 review items in
|
|
I reviewed this pull request on top of current
Please split the change: the URL parsing and login fixes can land alone. The |
…jm0-326edc4b-30d1-4f0b-8ba3-6aba001c436f
- Keep the non-workspace route denylist in flow_url and flow_route - Strip /fx, /fx/tools/flow, /u/<n>, and /<org>/global prefixes - Parse full URLs in project_id_from_url and is_project_subroute_url - Remove QueryCache, KV2T2d, minified names, and runtime injection - Forward URL authuser on the read-only cPZSdc workspace probe - Report unsupported_country and age_restricted errors on promotion
|
Split out the
|
Summary
src/flow_url.rsandts/flow_route.ts) that strip/fx/tools/flow,/fx,/u/<digits>, and/<org>/globalprefixes in any order while preserving the non-workspace route denylist (NON_WORKSPACE_SEGMENT_PREFIXES,/flow,/api, and/_) so unlisted workspace routes and/project/<id>/...subroutes remain accepted.Url::parseand passparsed.path()inproject_id_from_urlandis_project_subroute_url(src/project_route.rs), keeping/project/<id>/collection/<cid>on the collection grid while returning to/project/<id>from non-grid subroutes inensure_project_workspace_root./about,/flow,/flow/about, and/tools/flow/aboutunder all supported prefixes inis_about_landing_url.ts/check_auth.tson the read-onlycPZSdc(FLOW_APP_CONFIG)batchexecuteprobe (config[30] === falseandconfig[31] === false), forwarding URL-derivedauthuser(?authuser=or/u/<digits>) withoutQueryCachetraversal,KV2T2d, or unverified minified names..google.comauth cookies directly fromCookiesininspect_login_profile(src/chrome.rs) while reading optionalflow_urlandrejected_urlfromHistorywhen present.login_with_chrome(flow_loginaction="login"), settle for 4 seconds and promote (closingLoginChrometo flush cookies and DBSC keys) once.google.comauth cookies appear or whenLoginChromeexits, keep polling across temporary Flow SSO redirect routes infinalize_promoted_login, return explicit errors forunsupported_countryandage_restrictedinstead of"Run flow_login again", and return an error without opening a second window when verification fails.LoginChromewindow running during passiveflow_statusandflow_loginaction="status"checks while!st.exited.Verification
cargo xtask ci(cargo fmt --all -- --check, license header and<= 800code-line checks,tsc --noEmit, Flow build contracts for20261129.06_p0,clippy -D warnings,cargo doc --document-private-items,cargo build --locked --workspace, andcargo deny)./fx/tools/flow,/fx,/u/<digits>, and/<org>/global, unlisted workspace and project subroutes, and URL-onlyauthuserresolution.flow_loginandflow_statusbehavior: Cookies-onlyLoginChromepromotion withoutHistory, passive status checks preserving openLoginChrome, temporary/fx/api/auth/...SSO redirect polling,project_id_from_urlon full prefixed URLs,/collection/<cid>preservation, specificunsupported_countryandage_restrictederrors (via bothcPZSdcand redirect routes), and0700profile /0600lock permissions.