From: Mikael Nordfeldth Date: Thu, 29 Jan 2015 22:30:13 +0000 (+0100) Subject: Network wide public feed auth check fix X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=95751331deca49615941501fbf7da6226075c094;p=quix0rs-gnu-social.git Network wide public feed auth check fix --- diff --git a/actions/apitimelinenetworkpublic.php b/actions/apitimelinenetworkpublic.php index a2039a3761..957842600a 100644 --- a/actions/apitimelinenetworkpublic.php +++ b/actions/apitimelinenetworkpublic.php @@ -11,6 +11,9 @@ class ApiTimelineNetworkPublicAction extends ApiTimelinePublicAction protected function getStream() { + if (!$this->scoped instanceof Profile && common_config('public', 'localonly')) { + $this->clientError(_('Network wide public feed is not permitted without authorization'), 403); + } return new NetworkPublicNoticeStream($this->scoped); } } diff --git a/actions/networkpublic.php b/actions/networkpublic.php index 0948c35399..79e642b773 100644 --- a/actions/networkpublic.php +++ b/actions/networkpublic.php @@ -7,7 +7,7 @@ class NetworkpublicAction extends PublicAction protected function streamPrepare() { if (!$this->scoped instanceof Profile && common_config('public', 'localonly')) { - $this->serverError(_('Network wide public feed is not permitted without authorization'), 403); + $this->clientError(_('Network wide public feed is not permitted without authorization'), 403); } if ($this->scoped instanceof Profile && $this->scoped->isLocal() && $this->scoped->getUser()->streamModeOnly()) { $this->stream = new NetworkPublicNoticeStream($this->scoped);