Skip to content

Special URL will cause URL Malformed error which broke the asterisk match, this especially impact SSR mode. #2722

Closed
@zslucky

Description

@zslucky

Version

3.0.6

Reproduction link

https://codesandbox.io/s/wq6llvoxr7?fontsize=14

Steps to reproduce

  1. Config a simple router. (this step can be finished by using vue-cli, can quickly create a project with vue-router)
router = [
  { path: '/', component: 'home' },
  { path: '*', component: '404' },
]
  1. Using follow url in browser address bar. http://localhost:3000/a'a'b"c>%3f>%25%7D%7D%25%25>c<[[%3f$%7B%7B%25%7D%7Dcake//property

What is expected?

  1. In SPA, it should match 404 page which I configured.
  2. In SSR mode, it also should return the correct matched info.

What is actually happening?

  1. In SPA, got js error and blocked app.
  2. In SSR mode, can only handle error, can't render correct page.

This url will cause SSR can't render correct asterisk matched page.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions