Log when Message::__toString has an unexpected format
authorGergő Tisza <gtisza@wikimedia.org>
Thu, 22 Sep 2016 19:44:07 +0000 (19:44 +0000)
committerGergő Tisza <gtisza@wikimedia.org>
Thu, 22 Sep 2016 21:35:40 +0000 (21:35 +0000)
commit695f5f66d2e4254239fe86bf6a3dd0c929774ddb
treeb1ad725b290f5a1c945d3fb8d0a5efe75d5717a6
parent9ebc3cb47059400d9d934c76bcac1c101d5caf2b
Log when Message::__toString has an unexpected format

Message formatting methods have a side effect on how string conversion
will work, which is a security problem waiting to happen:

    $msg = new Message( 'foo' );
    echo $msg; // parsed
    echo $msg->plain();
    echo $msg; // not parsed

This change logs Message -> string transformations which are
affected by a prior call in this way. The behavior will be removed
in a later patch (possibly replaced by something more explicit
if it turns out that something depends on it).

Bug: T146416
Change-Id: Id51cf6a5a937bc41a914f317e980ef42e4d385fb
includes/Message.php