Skip to content

Crawler follows a <noscript> meta refresh when resolving the seed URL #437

Closed

Description

@nc9

Summary

Seed redirect resolution follows a <meta http-equiv="refresh"> that sits inside <noscript>. A browser with scripting enabled reads <noscript> content as plain text, so that refresh never fires, but the crawler treats it as a client-side redirect and re-seeds the whole crawl at the no-JS page.

Found while fixing #434. findClientRedirects in packages/utils/src/client-redirects.ts scans raw HTML for meta refresh tags and has no notion of <noscript>; the crawler calls it while resolving the seed URL (packages/crawler/src/core/crawler.ts, seed redirect loop).

Reproduce

import { findClientRedirects } from "@squirrelscan/utils/client-redirects";

findClientRedirects(
  `<html><head><noscript><meta http-equiv="refresh" content="0; url=/no-js.html"></noscript></head><body>app</body></html>`,
  "https://example.com/",
);
// => "https://example.com/no-js.html"

A site whose home page sends no-JS visitors to a fallback this way gets its audit seeded at the fallback page.

Acceptance Criteria

Activity

  1. added
    bug
    P2
    size: S
    rules
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2bugrulessize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions