Enforce viewing permissions for search and keywords in the Wiki. Fixes bug #12027

This commit is contained in:
Colin Kuskie 2011-01-20 11:21:51 -08:00
parent 8c2958b042
commit 973363b14c
4 changed files with 31 additions and 2 deletions

View file

@ -861,6 +861,8 @@ Return search results that match the keyword from the form variable C<keyword>.
sub www_byKeyword {
my $self = shift;
my $check = $self->checkView;
return $self->session->privilege->noAccess() unless $self->canView;
my $session = $self->session;
my $keyword = $session->form->process("keyword");
@ -972,6 +974,8 @@ Render a search form and process the contents, returning the results.
sub www_search {
my $self = shift;
my $check = $self->checkView;
return $self->session->privilege->noAccess() unless $self->canView;
my $i18n = WebGUI::International->new($self->session, "Asset_WikiMaster");
my $queryString = $self->session->form->process('query', 'text');
my $var = {