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

Ember 2.11 double forward slash causes application to break #14925

Closed
sergproua opened this issue Feb 10, 2017 · 7 comments · Fixed by #14961 or #18226
Closed

Ember 2.11 double forward slash causes application to break #14925

sergproua opened this issue Feb 10, 2017 · 7 comments · Fixed by #14961 or #18226

Comments

@sergproua
Copy link

accidently entered double forward slash in path breaks the application

http://localhost:4200//
or
http://localhost:4200//some-route

route error handler never gets called to recover

@locks
Copy link
Contributor

locks commented Feb 10, 2017

Duplicate of #11801.

@pixelhandler
Copy link
Contributor

pixelhandler commented Feb 10, 2017

@sergproua can you update your description to indicate what version of Ember you are using. If this you're using a current version of Ember then we may need to create a working example (e.g. using ember-twiddle.com) to reproduce the issue. As @locks indicated this seems to duplicate #10937.

@sergproua sergproua changed the title double forward slash causes application to break Ember 2.11 double forward slash causes application to break Feb 13, 2017
@sergproua
Copy link
Author

sergproua commented Feb 13, 2017

Hi @pixelhandler, I've updated description and will play with Ember-twiddle to build a working example and will attach. There's an easier way to recreate a problem.

ember new route-issue
cd route-issue
ember s

just open a browser to http://localhost:4200://

Uncaught DOMException: Failed to execute 'replaceState' on 'History': A history state object with URL 'http:' cannot be created in a document with origin 'http://localhost:4200' and URL 'http://localhost:4200//'.

@sergproua
Copy link
Author

#11801 is in fact a duplicate however is already closed, please advise what next steps are.

@stefanpenner
Copy link
Member

stefanpenner commented Feb 25, 2017

This seems legit!

Error messages

Chrome M56:

screen shot 2017-02-24 at 11 32 53 pm

Safari 9.1.3:

screen shot 2017-02-24 at 11 35 00 pm

Firefox 51.0.1:

screen shot 2017-02-24 at 11 36 36 pm

stefanpenner added a commit that referenced this issue Feb 25, 2017
This avoids a DOMException, which interprets duplicate `/` as a security violation and prevents the associated history state modifications.
@stefanpenner
Copy link
Member

potential fix: #14961

stefanpenner added a commit that referenced this issue Apr 5, 2017
This avoids a DOMException, which interprets duplicate `/` as a security violation and prevents the associated history state modifications.
stefanpenner added a commit that referenced this issue Apr 5, 2017
[BUGIX release] [Fixes #14925] remove duplicate `/` in pathname
rwjblue pushed a commit that referenced this issue Apr 7, 2017
This avoids a DOMException, which interprets duplicate `/` as a security violation and prevents the associated history state modifications.

(cherry picked from commit fe88d54)
rwjblue pushed a commit that referenced this issue Apr 7, 2017
This avoids a DOMException, which interprets duplicate `/` as a security violation and prevents the associated history state modifications.

(cherry picked from commit fe88d54)
@Exelord
Copy link
Contributor

Exelord commented Aug 2, 2019

This issue is still appearing in v3.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants