Skip to content

v4.5.1 - What the isolated world could not see

Latest

Choose a tag to compare

@ValeroK ValeroK released this 03 Oct 16:10
· 10 commits to main since this release

Fixed

  • AWS WAF detection loses the gokuProps triple under Camoufox beta.29+.
    This answers the open question from 3.0.0 and 4.5.0. It is a real
    detection regression, not a set_content timing artefact, and it hit
    production images too. From beta.29, Camoufox runs page.evaluate in an
    isolated JS world: the DOM is shared, but globals the page defines are
    not. So window.gokuProps read undefined even after the inline script
    had run. Measured directly: the same script's DOM write was visible, and
    its global was not. The detector now also parses the triple out of the
    inline <script> source, which is part of the DOM and visible from any
    world. The _KNOWN_BROKEN tolerance from 4.5.0 is gone, and a new case
    covers the shape live AWS WAF pages serve, with JSON-quoted keys and no
    awswaf <script src>.

    Not taken: launching with main_world_eval=True. That makes our own
    evaluation visible to the page, which a stealth browser cannot afford.

  • The same isolated world broke two more things. I audited every script
    passed to evaluate for page-global reads, and found two:

    • GeeTest went undetected on pages where the only sign was the
      initGeetest* globals, and its key and nonce fallbacks (__geetest_config,
      gtConfig) were always empty. The loader's <script src> and the inline
      init call now count as the same signal the global gave. The config is
      parsed from inline source through the same helper as gokuProps.
    • Image captchas never got their image. _IMAGE_B64_JS walked a
      Uint8Array, and Firefox forbids reading TypedArray data across the
      isolated-world boundary. Every call threw, _fetch_image_b64 logged a
      warning and returned "", and the image tier could not run. It now uses
      FileReader.readAsDataURL, which hands back a plain string. I checked
      that the page's cookies are still sent.

    Injection, token readback, the slider canvas grab and scrolling are only
    DOM reads and writes, and are unaffected. Each fix has a real-browser case
    that fails against the 4.5.0 code.

Changed

  • Lock refreshed against releases since 4.5.0: selectolax 0.4.13 -> 1.0.0,
    mcp 2.2.0 -> 2.3.0, plus markupsafe, trimesh and ast-serialize patches. CI's
    astral-sh/setup-uv action is bumped 10.0.1 -> 10.2.0. selectolax 1.0 is a
    new major version, but the Lexbor API we use is unchanged and the full suite
    passes on it. Its stubs now type css_first as returning None on a miss, so
    three type: ignore[unreachable] comments in Pattern C and a cast in the CSS
    extractor were removed rather than left as suppressions that suppress
    nothing.