- fix: XSS Vulnerability in WikiPage titles

- Depricated the random array function in WebGUI::Utility in favor of 
   List::Utils per the WebGUI Best Practices.
This commit is contained in:
JT Smith 2007-01-17 05:23:03 +00:00
parent 945be4a2de
commit e42a744ed9
7 changed files with 38 additions and 19 deletions

View file

@ -12,6 +12,7 @@ package WebGUI::Asset::Wobject::Poll;
#-------------------------------------------------------------------
use strict;
use List::Util;
use WebGUI::Form;
use WebGUI::International;
use WebGUI::SQL;
@ -382,7 +383,7 @@ sub view {
push(@labels, $self->get('a'.$i));
}
}
randomizeArray(\@answers) if ($self->get("randomizeAnswers"));
@answers = List::Util::shuffle(@answers) if ($self->get("randomizeAnswers"));
$var{answer_loop} = \@answers;
if ($self->getValue('generateGraph')) {

View file

@ -11,6 +11,7 @@ package WebGUI::Asset::Wobject::Survey;
#-------------------------------------------------------------------
use strict;
use List::Util;
use Tie::CPHash;
use WebGUI::HTMLForm;
use WebGUI::International;
@ -454,7 +455,7 @@ sub getRandomQuestionIds {
$where .= " and Survey_questionId not in (".$self->session->db->quoteAndJoin(\@usedQuestionIds).")";
}
my @questions = $self->session->db->buildArray("select Survey_questionId from Survey_question".$where);
randomizeArray(\@questions);
@questions = List::Util::shuffle(@questions);
return @questions;
}