Skip to content

Consecutive Slashes in URL #48

@jeansimoncollard

Description

@jeansimoncollard

I'm submitting a bug report

  • Library Version:
    1.3.0

Please tell us about your environment:

  • Operating System:
    Windows 10

  • NPM Version:
    6.4.1

  • Browser:
    At least Chrome 73.0.3683.75 and Internet Explorer

  • Language:
    TypeScript

Current behavior:

When the URL has double slashes (example: http://localhost:9000//route?parm1=... or http://localhost:9000/route1//route2?parm1=...), history.replaceState will remove the double slashes. This will produce the following security error because the two URLs don't match anymore:

Unhandled rejection SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL [...] cannot be created in a document with origin 'http://localhost:9000' and URL [...].

Steps to reproduce
Add an extra slash to have two consecutive slashes inside any route of your Aurelia app

Expected behavior

Url should be insensitive to the number of consecutive slashes

Use Case

We have an external partner with a very long release cycle who is calling us with two consecutive slashes

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