Page MenuHomePhabricator

new meta=siteinfo&siprop=protocols does not work correct
Closed, ResolvedPublic

Description

gerrit 49179 adds siprop=protocols.

But that gives for
http://test2.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=protocols

<s<a href="pan">pan</a> style="color:blue;">&lt;?xml version=&quot;1.0&quot;?&gt;</s<a href="pan">pan</a>>
<s<a href="pan">pan</a> style="color:blue;">&lt;a<a href="pi">pi</a>&gt;</s<a href="pan">pan</a>>

<s<a href="pan">pan</a> style="color:blue;">&lt;query&gt;</s<a href="pan">pan</a>>
  <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="protocols">protocols</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="http://">http://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="https://">https://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="ftp://">ftp://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="irc://">irc://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="ircs://">ircs://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="gopher://">gopher://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="telnet://">telnet://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="nntp://">nntp://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="worldwind://">worldwind://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="mailto:">mailto:</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="news:">news:</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="svn://">svn://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="git://">git://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>><a href="mms://">mms://</a><s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
    <s<a href="pan">pan</a> style="color:blue;">&lt;<a href="p">p</a>&gt;</s<a href="pan">pan</a>>//<s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="p">p</a>&gt;</s<a href="pan">pan</a>>
  <s<a href="pan">pan</a> style="color:blue;">&lt;/<a href="protocols">protocols</a>&gt;</s<a href="pan">pan</a>>
<s<a href="pan">pan</a> style="color:blue;">&lt;/query&gt;</s<a href="pan">pan</a>>

<s<a href="pan">pan</a> style="color:blue;">&lt;/a<a href="pi">pi</a>&gt;</s<a href="pan">pan</a>>

This is happen, because ApiResult::setIndexedTagName is called and added the 'p' as protocol to $wgUrlProtocols, should be done on a copy of the array, not on the global direct.


Version: 1.21.x
Severity: major

Details

Reference
bz45130

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:37 AM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz45130.

Cherry-picked to 1.21wmf10 in Gerrit change 49795, deployed by Anomie.