diff options
author | Brion Vibber <brion@pobox.com> | 2010-12-06 17:20:14 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-12-06 17:20:14 -0800 |
commit | 4b4b763255ad3b2bff8f18da2bd3927b52a54e55 (patch) | |
tree | 2a7a4338e4da3cff69c9e1260cfe64ba162aac1e | |
parent | 66621413287aa73e385d2ad50336a43e90129720 (diff) |
For good measure, don't return autocomplete results when not logged in.
-rw-r--r-- | plugins/Autocomplete/autocomplete.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/Autocomplete/autocomplete.php b/plugins/Autocomplete/autocomplete.php index c4b30d264..c92002245 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'); |