fix - Secure the search function
This commit is contained in:
parent
dc584ec66d
commit
d27fc4917f
2 changed files with 4 additions and 2 deletions
|
|
@ -9,4 +9,5 @@
|
||||||
- fix: Search returns not restricted to chosen path or asset type
|
- fix: Search returns not restricted to chosen path or asset type
|
||||||
- fix: Product Asset - specification labels not showing
|
- fix: Product Asset - specification labels not showing
|
||||||
- fix: Folders displayed for underprivileged users (wouter / Procolix)
|
- fix: Folders displayed for underprivileged users (wouter / Procolix)
|
||||||
|
- fix: Secure the search function
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,12 +141,13 @@ sub view {
|
||||||
my @results = ();
|
my @results = ();
|
||||||
my $rs = $search->getResultSet;
|
my $rs = $search->getResultSet;
|
||||||
while (my $data = $rs->hashRef) {
|
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}));
|
if ($self->session->user->userId eq $data->{ownerUserId} || $self->session->user->isInGroup($data->{groupIdView}) || $self->session->user->isInGroup($data->{groupIdEdit})) {
|
||||||
push(@results, {
|
push(@results, {
|
||||||
url=>$data->{url},
|
url=>$data->{url},
|
||||||
title=>$data->{title},
|
title=>$data->{title},
|
||||||
synposis=>$data->{synopsis},
|
synposis=>$data->{synopsis},
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
my $p = WebGUI::Paginator->new($self->session,$self->getUrl('doit=1;keywords='.$self->session->url->escape($self->session->form->get('keywords'))));
|
my $p = WebGUI::Paginator->new($self->session,$self->getUrl('doit=1;keywords='.$self->session->url->escape($self->session->form->get('keywords'))));
|
||||||
$p->setDataByArrayRef(\@results);
|
$p->setDataByArrayRef(\@results);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue