We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 908551ae authored by Evan Prodromou's avatar Evan Prodromou

disallow access to out-of-scope poll

parent 2856982a
......@@ -76,6 +76,18 @@ class ShowPollAction extends ShownoticeAction
throw new ClientException(_m('No such poll notice.'), 404);
$cur = common_current_user();
if (!empty($cur)) {
$curProfile = $cur->getProfile();
} else {
$curProfile = null;
if (!$this->notice->inScope($curProfile)) {
throw new ClientException(_('Not available.'), 403);
$this->user = User::staticGet('id', $this->poll->profile_id);
if (empty($this->user)) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment