From 75a298c5005971a9d6c8940ff17f9b753b0de31f Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sat, 13 Apr 2019 23:43:14 +0100 Subject: [PATCH] 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 --- includes/actions/HistoryAction.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; } -- 2.20.1