Skip to content

Infinite redirect loop ("ERR_TOO_MANY_REDIRECTS") caused by encoded unsafe characters in URL pathname #7587

Description

@FlorianV85

Which project does this relate to?

Start

Describe the bug

Hey!

When a URL pathname contains encoded unsafe characters (e.g <, >, ", //, ...), an infinite redirect loop is started and the browser crashes with an ERR_TOO_MANY_REDIRECTS error.

This happens in both basic paths and paths with parameters.

Complete minimal reproducer

Any blank project initialized with @tanstack/cli is sufficient for reproducing the issue—no additional code is needed

Steps to Reproduce the Bug

  1. Create a TanStack Start project from scratch. You don't need to add anything; just start the dev server and proceed to step 2
  2. Open http://localhost:3000/<test

Expected behavior

I think it should throw a 404 error

Screenshots or Videos

Image Image

Platform

  • Router / Start Version: Router v1.170.15 / React-Start v1.168.25
  • OS: Windows 11 - Ubuntu WSL2
  • Browser: Brave (chrominium)
  • Browser Version: v1.91.168
  • Bundler: Vite
  • Bundler Version: v8.0.16

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions