Skip to content

Conversation

@danielroe
Copy link
Member

Issue:
Currently a path beginning with three slashes (///) will in fact potentially redirect to another domain. This is because the cleanPath utility only replaces two slashes, leaving two behind.

Reproduction:
https://stackblitz.com/edit/vue-router-3-redirect

This PR simply replaces consecutive slashes with a single slash.

Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this is not the correct fix as cleanPath is used in a variety of places, so it would change routes that have multiple slashes but at the same time, it's already turning paths like //thing into /thing so this simple fix shouldn't have any undesired side effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

replaceState Error when path starts with // and scrollBehavior is set

2 participants