Remove Target/User validation from Block::appliesToUsertalk()
authorDavid Barratt <dbarratt@wikimedia.org>
Mon, 25 Feb 2019 18:35:35 +0000 (13:35 -0500)
committerDavid Barratt <dbarratt@wikimedia.org>
Mon, 25 Feb 2019 20:22:21 +0000 (15:22 -0500)
commit680565ed3fba3c20987ee318947c30e582a51e6c
tree487056358b8ac4dd7678fcb6a872b7ea550fef70
parent0db472a3d59545ec7e7bc8e86f623b07aa95d90b
Remove Target/User validation from Block::appliesToUsertalk()

This fixes a regression in I0e131696419211319082cb454f4f05297e55d22e where
an IP block that also blocks logged in users from editing, throws an exception.

The target/user validation in Block::appliesToUsertalk() does not work well
when an IP block prevents logged in users from editing. This case throws a
validation error, when in reality it should make a judgement.

This change means that the method will now trust whatever is passed into it as
the current user's talk page.

Bug: T211578
Change-Id: I3bb27cf7bec8421d31aa4de28a0e658365bb5bf2
includes/Block.php