mirror of
https://github.com/apache/superset.git
synced 2026-07-13 10:15:58 +00:00
Three findings from the post-RF 5-lane + adversarial review pass on
HEAD `2428f3e801`. All scoped tight; mirrors the RF-1..RF-4 commit shape.
AR-M1 (`superset/views/utils.py`) — `get_explore_redirect_url` only fell
back when `form_data.slice_id` was `None`. A non-int, non-None shape
(`"abc"`, `[1, 2]`, `{"id": 1}`, `True`) survived into
`CommandParameters(chart_id=...)` and 500ed at the cache write — the
residual gap RF-1 surfaced but did not fully close. Tightened to
`not isinstance(slice_id, int) or isinstance(slice_id, bool)`; the
fallback path `request.args.get("slice_id", type=int) or 0` already
handles the typed parse. Bool excluded explicitly because it is a
subclass of `int` in Python and would otherwise become `chart_id=1`.
CR-M1 ≡ AR-L1 (`superset-frontend/src/utils/navigationUtils.ts`) — the
RF-4 comment promised the bidi formatting marks U+202A..U+202E
(LRE/RLE/PDF/LRO/RLO) and U+2066..U+2069 (LRI/RLI/FSI/PDI), but the
original regex character class only covered U+200E/F. WHATWG strips
these before host parsing, but defence-in-depth — close the
documentation/regex drift. Both review lanes independently surfaced
this; strong signal even though not exploitable.
M5 doc note (`UPDATING.md`) — `EMBEDDED_DISABLE_PERMALINK_ORIGIN_REWRITE`
(introduced at Slice 8) was missing from the operator-facing
UPDATING.md #39925 block. Added one paragraph clarifying default
(`False` = rewrite on), opt-out condition (proxy forwards
`X-Forwarded-Host` and operator wants literal backend origin), and why
the default cannot flip.
Tests added:
- 9 jest cases in `navigationUtils.test.ts` covering each new bidi
formatting mark routed through `openInNewTab`.
- 1 parametrised pytest in `test_explore_redirect.py` (4 non-int
`slice_id` shapes → 302 with `chart_id=0`); deferred to CI per the
same docker-light `/login/` POST 404 baseline as Slices 4–8.
Verification:
- `npx jest src/utils/navigationUtils.test.ts` — 47 passed (38 prior +
9 new bidi).
- `SKIP=pylint,oxlint-frontend pre-commit run` — clean. pylint baseline
carried per Slices 4–8 worktree subshell miss; oxlint native-binding
gap is a worktree env issue, not lint findings (same baseline as
Slices 4–8 commits).
Closes: AR-M1, CR-M1, AR-L1, M5 doc nit (defers CR-M2 casefold
disable-guard, AR-M2 docstring nit — both noted as deferred in the
review).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>