From: Eugen Rochko Date: Tue, 11 Jul 2017 15:08:26 +0000 (+0200) Subject: Fix #3462 - Require authentication for search API (#4155) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=f93de3a516d23cddea7cce147d3da3decac85f2f;p=mastodon.git Fix #3462 - Require authentication for search API (#4155) This makes it consistent with /api/v1/accounts/search and previous behaviour has been an oversight. --- diff --git a/app/controllers/api/v1/search_controller.rb b/app/controllers/api/v1/search_controller.rb index 1353682ea..bc5b8e5d4 100644 --- a/app/controllers/api/v1/search_controller.rb +++ b/app/controllers/api/v1/search_controller.rb @@ -3,6 +3,9 @@ class Api::V1::SearchController < Api::BaseController RESULTS_LIMIT = 5 + before_action -> { doorkeeper_authorize! :read } + before_action :require_user! + respond_to :json def index