From: Brion Vibber Date: Tue, 7 Dec 2010 01:20:14 +0000 (-0800) Subject: For good measure, don't return autocomplete results when not logged in. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4b4b763255ad3b2bff8f18da2bd3927b52a54e55;p=quix0rs-gnu-social.git For good measure, don't return autocomplete results when not logged in. --- diff --git a/plugins/Autocomplete/autocomplete.php b/plugins/Autocomplete/autocomplete.php index c4b30d264d..c92002245f 100644 --- a/plugins/Autocomplete/autocomplete.php +++ b/plugins/Autocomplete/autocomplete.php @@ -87,7 +87,15 @@ class AutocompleteAction extends Action function prepare($args) { + // If we die, show short error messages. + StatusNet::setApi(true); + parent::prepare($args); + + $cur = common_current_user(); + if (!$cur) { + throw new ClientException('Access forbidden', true); + } $this->groups=array(); $this->users=array(); $q = $this->arg('q');