fix - Secure the search function
This commit is contained in:
parent
dc584ec66d
commit
d27fc4917f
2 changed files with 4 additions and 2 deletions
|
|
@ -141,12 +141,13 @@ sub view {
|
|||
my @results = ();
|
||||
my $rs = $search->getResultSet;
|
||||
while (my $data = $rs->hashRef) {
|
||||
next unless ($self->session->user->userId eq $data->{ownerUserId} || $self->session->user->isInGroup($data->{groupIdView}) || $self->session->user->isInGroup($data->{groupIdEdit}));
|
||||
push(@results, {
|
||||
if ($self->session->user->userId eq $data->{ownerUserId} || $self->session->user->isInGroup($data->{groupIdView}) || $self->session->user->isInGroup($data->{groupIdEdit})) {
|
||||
push(@results, {
|
||||
url=>$data->{url},
|
||||
title=>$data->{title},
|
||||
synposis=>$data->{synopsis},
|
||||
});
|
||||
}
|
||||
}
|
||||
my $p = WebGUI::Paginator->new($self->session,$self->getUrl('doit=1;keywords='.$self->session->url->escape($self->session->form->get('keywords'))));
|
||||
$p->setDataByArrayRef(\@results);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue