Page MenuHomePhabricator

Routes with multiple consecutive slashes are possibly invalid
Open, LowPublicBUG 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?

We are indeed running 1.21.1-2. I'll try to get us upgraded tonight.

I've upgraded xtools-dev to 1.23.1 but I seem to be having the same issue as T403566#11371339 :(

I'll try debugging again more tomorrow.

Gah, we'll have to go for - I suppose. AFAICS only 2 tools are affected for now: pages & globalcontribs. I've done it in #593. @MusikAnimal : Could you take a look? (Side note: beyond this issue the pagination in PC has issues; like no "back" buton; but that's a question for later). (Also, it appears that CI is broken again).

Alien333 changed the task status from Open to In Progress.Dec 21 2025, 11:12 AM
Alien333 claimed this task.

Sorry for the delay. I found some more time to debug and I think I've figured it out! It seems to work on xtools-dev now https://xtools-dev.wmcloud.org/pages/en.wikipedia.org/Ortizesp/0/noredirects/all///2023-10-04T05:59:30Z

MusikAnimal lowered the priority of this task from Medium to Low.Dec 28 2025, 4:19 AM

I just needed to do a bit more trial-and-error but we should be good now :)

For the record, the issue was indeed both the upgrade to Apache that auto-strips multiple slashes, and the older Anubis which didn't support them at all.

Thank for the PR nonetheless! I think it's still worth pursuing given there are other various downsides to using consecutive multiple slashes in URLs. I'll keep the task open for now.

Thank you, in there, for your efforts!

Trygve

Fra: MusikAnimal <no-reply@phabricator.wikimedia.org>
Sendt: søndag 28. desember 2025 05:20
Til: Phabricator <no-reply@phabricator.wikimedia.org>
Kopi: trygve.nodeland@outlook.com
Emne: [Maniphest] [Lowered Priority] T403566: Routes with multiple consecutive slashes are redirected to (possibly invalid) routes with a single slash instead

MusikAnimal lowered the priority of this task from "Medium" to "Low".
MusikAnimal added a comment.
View Taskhttps://phabricator.wikimedia.org/T403566

I just needed to do a bit more trial-and-error but we should be good now :)

For the record, the issue was indeed both the upgrade to Apache that auto-strips multiple slashes, and the older Anubis which didn't support them at all.

Thank for the PR nonetheless! I think it's still worth pursuing given there are other various downsides to using consecutive multiple slashes in URLs. I'll keep the task open for now.

TASK DETAIL
https://phabricator.wikimedia.org/T403566

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

MusikAnimal renamed this task from Routes with multiple consecutive slashes are redirected to (possibly invalid) routes with a single slash instead to Routes with multiple consecutive slashes are possibly invalid.Jan 3 2026, 4:40 AM
MusikAnimal changed the task status from In Progress to Open.

Don't intend to work on moving to -s everywhere in the near future.