• Home
  • Get help
  • Ask a question
Last post 10 hours 36 min ago
Posts last week 81
Average response time last week 4 hours 29 min
All time posts 67915
All time tickets 10498
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#7853 – Infinite slashes '/' are allowed in URLs

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Sunday, 06 June 2021 16:54 UTC
TheSDHotel

Hey there,

I randomly stumbled upon and found a potentially obscure issue.

You can add any amount of forward slashes in-between url fragments, and the page will keep working and resolve the page.

See example:

https://www.xxxx.com////////events-results/ppv-special/////njpw-world-tag-league-2016-finals

You can add as many slashes as you like in any of the URL fragments. It will keep working and resolves the page.

But apparently, Googling around, this is a "normal" behavior: https://stackoverflow.com/questions/10161177/url-with-multiple-forward-slashes-does-it-break-anything

So I guess nothing that has to do with sh404sef. But I noticed it will even keep those slashes in the canonical URL that sh404sef generates as well. Eg. check the canonical URL in the HTML of the page I sent you.

Let me know what you think!

Sunday, 06 June 2021 18:02 UTC
TheSDHotel

Weirdly enough, Invision Power Board is able to return a 404 in those cases (which is likely a lot better). See example:

https://www.xxxx.com/forum/////user//////1-andy-badwool/

vs

https://www.xxxx.com/forum/user/1-andy-badwool/

Strangely, Joomla is not able to do that. Maybe something that you could add to sh404sef?

Monday, 07 June 2021 09:04 UTC
wb_weeblr

Hi

Strangely, Joomla is not able to do that. Maybe something that you could add to sh404sef?

Indeed, I'm even surprised sh404SEF is tricked by that. I suspect this is because we work inside Joomla router and by the time we get the request information, Joomla has already removed the multiple /.

Does not seem major but I'll add it to tracker, we may be able to workaround this.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 

 
Monday, 07 June 2021 09:23 UTC
TheSDHotel

Joomla has already removed the multiple /.

What you mean? I think the issue is that Joomla does not remove those extra slashes? But maybe I misunderstood what you mean.

But yeah, probably not major, never figured this out in all these years.

Not sure if in this case it would be better to resolve to a 404 page, or to instead 301 redirect to the the "correct" page with stripped extra slashes (the page with just one / slash per separator)

But I also think this is not something that should be your job to fix (in sh404sef) but probably rather something that Joomla should fix probably.

Monday, 07 June 2021 10:09 UTC
wb_weeblr

Hi

What you mean? I think the issue is that Joomla does not remove those extra slashes? But maybe I misunderstood what you mean.

It totally does, this is why it actually works and can display a page. By default for instance, Joomla strips from incoming requests a trailing slash, ie if you request /my-page or /my-page/, Joomla will consider this the same page (what's displayed on screen is not relevant here, it's only the internals that matter for decoding a request).

I remember that I have special processing to put back a trailing slash into the URL before trying to decode it because it's a common situation but I certainly do not try to restore multiple ///. 

But yeah, probably not major, never figured this out in all these years.

I have never even heard of this in 15 years. How would such URLs be created?

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Monday, 07 June 2021 10:57 UTC
TheSDHotel

Gotcha. 

I have never even heard of this in 15 years. How would such URLs be created?

Yeah, crazy, me neither :D

They (likely) don't get created in any way.

I just stumbled upon it via a typo. I accidentally had an extra / in a URL and noticed it. And noticed it still worked as normal. So I wondered, wait, how does this work? If 2 slashes worked, what if I add more? What if I add 10 slashes? And it still works. And that's how I stumbled upon this quirkness :D

 

Monday, 07 June 2021 12:34 UTC
wb_weeblr

Hi

OK, so I thought. Will stay like that I think.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Monday, 07 June 2021 15:01 UTC
TheSDHotel

Yup.

I will look into fixing it via htaccess, or leaving it like that.

This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.