From: Timo Tijhof Date: Sat, 13 Apr 2019 22:43:14 +0000 (+0100) Subject: HistoryAction: Consider 'feed=' and 'feed=0' as invalid feed actions X-Git-Tag: 1.34.0-rc.0~2010^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_del%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=75a298c5005971a9d6c8940ff17f9b753b0de31f;p=lhc%2Fweb%2Fwiklou.git HistoryAction: Consider 'feed=' and 'feed=0' as invalid feed actions Previously it did a PHP truthy check, which is unrelated to the check in question and outside its responsibility to do. The validation of the value happens inside HistoryAction::feed and more specifically in FeedUtils::checkFeedOutput(). Also remove needless use of unicode normalization as this only accepts exact pre-configured presets. Those presets are linked by the sidebar and thus never considered user or otherwise in need of any normalization. Change-Id: Id68a753bb5a5f03f983f5b813a42e784cf91e8c9 --- diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php index bc1d351362..fc42be4612 100644 --- a/includes/actions/HistoryAction.php +++ b/includes/actions/HistoryAction.php @@ -181,10 +181,9 @@ class HistoryAction extends FormlessAction { } // Handle atom/RSS feeds. - $feedType = $request->getVal( 'feed' ); - if ( $feedType ) { + $feedType = $request->getRawVal( 'feed' ); + if ( $feedType !== null ) { $this->feed( $feedType ); - return; }