Page MenuHomePhabricator

Routes with multiple consecutive slashes are redirected to (possibly invalid) routes with a single slash instead
Open, MediumPublicBUG REPORT

Description

/var/www/vendor/symfony/http-kernel/EventListener/RouterListener.php: 135 - No route found for "GET https://xtools.wmcloud.org/pages/en.wikipedia.org/Ortizesp/0/noredirects/all/2023-07-30T06:39:37Z" (from "https://xtools.wmcloud.org/pages/en.wikipedia.org/Ortizesp")

URL: https://xtools.wmcloud.org/pages/en.wikipedia.org/Ortizesp/0/noredirects/all/2023-07-30T06:39:37Z

Please provide any further details here

XTools version: 3.22.1-0f2461ad

Event Timeline

Izno renamed this task from PLEASE REPLACE WITH A DESCRIPTION OF THE ERROR to No route found for "GET https://xtools.wmcloud.org/pages/en.wikipedia.org/Ortizesp/0/noredirects/all/2023-07-30T06:39:37Z".Sep 3 2025, 2:52 AM
Alien333 triaged this task as Medium priority.Oct 21 2025, 8:58 AM
Alien333 moved this task from Backlog to General / other on the XTools board.
Alien333 added subscribers: MusikAnimal, Alien333.

@MusikAnimal : I believe this is another consequence of routing setup changes. From https://xtools.wmcloud.org/pages/en.wikipedia.org/Ortizesp/0/noredirects/all, the URL for the next page is https://xtools.wmcloud.org/pages/en.wikipedia.org/Ortizesp/0/noredirects/all///2023-10-04T05:59:30Z, which is correct: there are two empty spaces between slashes to say there is no start date and no end date; and the offset is indeed the third parameter after the deleted param. However, it at some point of the routing is redirected to https://xtools.wmcloud.org/pages/en.wikipedia.org/Ortizesp/0/noredirects/all/2023-10-04T05:59:30Z, which doesn't work: the offset is now being interpreted as a start date, which it doesn't match.
Do you think this is something easily fixable in routing (if an option like "collapse consecutive slashes" can be disabled), or should we just adapt for the start parameter to possibly be interpreted as an offset? I'm afraid we would also have other fixes to do in other places if it's the second case.

Alien333 renamed this task from No route found for "GET https://xtools.wmcloud.org/pages/en.wikipedia.org/Ortizesp/0/noredirects/all/2023-07-30T06:39:37Z" to Routes with multiple consecutive slashes are redirected to (possibly invalid) routes with a single slash instead.Oct 21 2025, 9:00 AM
Alien333 changed the subtype of this task from "Task" to "Bug Report".

It works fine on my local so yes, it's some other Apache configuration I broke. I'm investigating.

I have tried using Apache's MergeSlashes Off directive in both the VHost for Anubis and the actual application. I can see that Anubis redirects /// to /, despite the directive, so it's possible Anubis is the actual problem. I doubt it, though. I think I've just got the Apache config wrong.

Apache auto-merging slashes is a relatively new thing. I think Alien333 and I concluded that happened with the VPS upgrade that happened with the Anubis installation (T400229). So downgrading Apache is a possible fix, but I wouldn't consider that an acceptable solution.

Regardless, it looks like we are going to need to rework the routing to have dashes - in place of empty resources, that way there won't be any consecutive slashes in the URL. That will fix it, but any backlinks will break. This incomplete Global Search suggests there are quite a few.

Same problem here...
Even replacing /// by %2f%2f%2f produces the same error...

After some digging, it looks like up to https://github.com/TecharoHQ/anubis/pull/1155 (which was pushed on Sept 27, so about two months after we added anubis), anubis always redirected multiple slashes! That was fixed in v1.23, but there's a good chance we still have the old version.
@MusikAnimal : please tell me we're currently running on <v1.23 so we can finally get rid of this issue; and if so, could you please try and upgrade it?