SECURITY: Always normalize link url before adding to ParserOutput
authorBrian Wolff <bawolff+wn@gmail.com>
Fri, 11 Mar 2016 01:08:06 +0000 (20:08 -0500)
committerChad Horohoe <chadh@wikimedia.org>
Thu, 6 Apr 2017 20:44:44 +0000 (13:44 -0700)
commit17e7bc02357e42a78cf5fdcbf9e550dda4631ac6
tree127a5c2ece5446b4dcc1b8ae416f1a43135101da
parentb2301ab354afb1688862a78cdcac76bee91fe81c
SECURITY: Always normalize link url before adding to ParserOutput

Move link normalization directly into addExternalLink() method,
since you always need to do it - having it separate is just
inviting people to forget to normalize a link.

Additionally, links weren't properly registered for <gallery>.
This was somewhat unnoticed, as the call to recursiveTagParse()
would register free links, but it wouldn't work for example with
protocol relative links.

Issue originally reported by MZMcBride.

Bug: T48143
Change-Id: I557fb3b433ef9d618097b6ba4eacc6bada250ca2
RELEASE-NOTES-1.29
includes/parser/Parser.php
includes/parser/ParserOutput.php