Page MenuHomePhabricator

Circular redirects not caught between wikis
Closed, ResolvedPublic

Description

Author: creidieki+wiki

Description:
If you create pages on two wikis which redirect to each other, the browser goes
into an infinite loop of redirecting between them. Please see attached page for
example.


Version: unspecified
Severity: minor
URL: http://en.wikipedia.org/wiki/User:Creidieki/Sandbox?redirect=no

Details

Reference
bz850

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 7:02 PM
bzimport set Reference to bz850.
bzimport added a subscriber: Unknown Object (MLST).

This is a symptom of there not really being a way to signal the destination (which may not
even be a MediaWiki -- or a wiki at all) that it's the target of a redirect rather than just a
link. Another symptom is that if you want to go back to the redirecting page to change it
you have to manually cobble together the URL.

It's possible that we could add some kind of URL marker which would be MediaWiki-
specific to let the destination know where it came from, and either enable it only
sometimes or just tack it on for any interwiki redirect.

gangleri wrote:

I worked in telecommunication and handeled cyclic routing between independend
carriers. If you are able to identify users (both loged in and anonymuos) and
remember the last requested page together with a timestamp implement both a
trashold for the time and a number of maximal attempts you are able to
generate an alarm for that page.

Sysops could verify that page and see if it redirects (also to a external
destination). This way you can correct them.

This is an issue of a malicious attac too and should be handeled with special
care.

Exceptions: If a page is generated (viewed in the preview or saved) templates
could be requested multiple times (800 times, see [[bug 95]]).

Regards Reinhardt

That's totally irrelevant; the user agent gives up after several levels deep, and there are other issues
to deal with (backlink) which would render this moot. I have no idea what templates are supposed to
do with this.

rowan.collins wrote:

(In reply to comment #1)

It's possible that we could add some kind of URL marker which would be MediaWiki-
specific to let the destination know where it came from, and either enable it

only

sometimes or just tack it on for any interwiki redirect.

Hmm... I think maybe it would be a good idea to:

  1. limit interwiki redirects to only specifically allowed prefixes (i.e. only

allow redirects to other Wikimedia Foundation projects); this just needs a flag
in the appropriate db table - in fact, isn't there already one for "local" or
somesuch? would that indicate the right subset? I was surprised to find that
"#REDIRECT [[Google:foo]]" actually works right now...

  1. treat interwiki redirects differently from normal interwiki links, and (since

with [1] implemented we can be sure they're running MW) append an extra
argument, like "&redirectedfrom=Project:Pagename", where "Project:" is the
interwiki prefix of the source (which should be $wgLocalInterwiki, I presume).
Then, when a page is requested with that argument, it can be rendered as though
it were a normal redirected page: don't accept further "#REDIRECT"s, display
"redirected from [[Project:Pagename]]", etc. There should probably also be a
check that "Project:Pagename" corresponded to a valid "local" interwiki target
(i.e. one that could be redirected to, and is therefore plausibly being
redirected from) to avoid any weird URL spoofing tricks.

gangleri wrote:

The changes made here might be the cause of
Bug 2342: w:he:(aleph) is a valid interwiki link at en: but not at other wiki's

rowan.collins wrote:

(In reply to comment #5)

This seems to be fixed. See http://test.leuksman.com/index.php/Bugzilla_0850 .

Yes, I think the "only redirect to local projects" part was implemented some
time ago; don't know about the circular (but "local") redirect business though.

gangleri wrote:

This bug is still open:
[[yi:User:Gangleri]] includes [[en:meta:User:Gangleri]] which shows as a
interwiki to [[en:]] but redirects to [[meta:User:Gangleri]]

Regards Reinhardt

gangleri wrote:

addition to comment 8

This bug is still open:
[[yi:User:Gangleri]] includes *there* [[en:meta:User:Gangleri]] which shows as a
interwiki to [[en:]] *in the other languages* part but redirects to
[[meta:User:Gangleri]]

P.S. No not mix with *what you get* if you click on the links at bugzilla.

Regards Reinhardt

gangleri wrote:

This bug is referred at bug 2701 comment 2
Bug 2701: Interwiki redirects redirect to local page with interwiki title

*note*
The new examples at
http://commons.wikimedia.org/wiki/User:Gangleri/tests/bugzilla/00850/note_c8
are similar to those from comment 8 and comment 9 but are *neither* explicite
REDIRECTs and *nor* circular.

These are just hacked constructs that redirect trough a chain of wikies.

best regards reinhardt [[user:gangleri]]

Restored bug from flood attack.

Interwiki redirects can no longer exist. Resolving as FIXED.

rotemliss wrote:

(In reply to comment #12)

Interwiki redirects can no longer exist. Resolving as FIXED.

As far as I understand, they are exist, but not enabled on Wikimedia. This bug
is about MediaWiki in general, though. Reopening.

I'm quite confused about this bug. r7707 seems to have fixed this issue long ago. Otherwise, the bug summary is simply wrong or misleading.

mike.lifeguard+bugs wrote:

Marked FIXED per comment 14.