Skip to content

Commit

Permalink
Item12491: don't disclose topics a user doesn't have view rights on
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@16706 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed May 6, 2013
1 parent 8970f98 commit 27212f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/lib/Foswiki/Macros/TOPICLIST.pm
Expand Up @@ -31,6 +31,10 @@ sub TOPICLIST {
my $it = $webObject->eachTopic();
while ( $it->hasNext() ) {
my $item = $it->next();

my $topicObject = Foswiki::Meta->new( $this, $web, $topic );
next unless $topicObject->haveAccess("VIEW");

my $line = $format;
$line =~ s/\$web\b/$web/g;
$line =~ s/\$topic\b/$item/g;
Expand Down

0 comments on commit 27212f0

Please sign in to comment.