Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty query param name breaks proxy to external URL #68039

Closed
flippidippi opened this issue Jul 22, 2024 · 0 comments · Fixed by #68157
Closed

Empty query param name breaks proxy to external URL #68039

flippidippi opened this issue Jul 22, 2024 · 0 comments · Fixed by #68157
Labels
bug Issue was opened via the bug report template. Runtime Related to Node.js or Edge Runtime with Next.js.

Comments

@flippidippi
Copy link

flippidippi commented Jul 22, 2024

Link to the code that reproduces this issue

https://github.com/flippidippi/nextjs-issue-empty-query-param-proxy

To Reproduce

  1. Start the app npm run dev
  2. Noticed the rewrites in next.config.mjs
  3. Go to each page

Current vs. Expected behavior

I expect the URLs that currently break, to not 500 and successfully proxy with an empty query param name

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Fri Mar 29 23:14:13 UTC 2024
  Available memory (MB): 15999
  Available CPU cores: 4
Binaries:
  Node: 20.11.1
  npm: 10.2.4
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.0.0-canary.76 // Latest available version is detected (15.0.0-canary.76).
  eslint-config-next: N/A
  react: 19.0.0-rc.0
  react-dom: 19.0.0-rc.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Runtime

Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local), Other (Deployed)

Additional context

No response

@flippidippi flippidippi added the bug Issue was opened via the bug report template. label Jul 22, 2024
@github-actions github-actions bot added the Runtime Related to Node.js or Edge Runtime with Next.js. label Jul 22, 2024
@flippidippi flippidippi changed the title Empty query param name breaks proxy Empty query param name breaks proxy to external URL Jul 23, 2024
ijjk added a commit that referenced this issue Sep 11, 2024
Empty Query Param in redirect url causes 500 error issue #68039 .
Fixes: #68039 .
Also added test case for same.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Runtime Related to Node.js or Edge Runtime with Next.js.
Projects
None yet
1 participant