aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-08-04 16:05:11 -0700
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-08-04 16:05:11 -0700
commit78a79955b68acf13928df15e4af0bba9d597232d (patch)
tree0a9b619f4e21b50976c95afa3d7ad283353bc78b /mod_perl.pl
parentBug 674497: (CVE-2011-2979) [SECURITY] Custom searches let you determine if a... (diff)
downloadbugzilla-78a79955b68acf13928df15e4af0bba9d597232d.tar.gz
bugzilla-78a79955b68acf13928df15e4af0bba9d597232d.tar.bz2
bugzilla-78a79955b68acf13928df15e4af0bba9d597232d.zip
Bug 658407: Make Bugzilla not use Math::Random::Secure anymore, due to the
difficulty of installing its dependencies. Instead move the code directly into Bugzilla itself. r=LpSolit, r=glob, a=mkanat
Diffstat (limited to 'mod_perl.pl')
-rw-r--r--mod_perl.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/mod_perl.pl b/mod_perl.pl
index 460e6216b..2f4016952 100644
--- a/mod_perl.pl
+++ b/mod_perl.pl
@@ -39,7 +39,6 @@ use Apache2::Log ();
use Apache2::ServerUtil;
use ModPerl::RegistryLoader ();
use File::Basename ();
-use Math::Random::Secure;
# This loads most of our modules.
use Bugzilla ();
@@ -49,6 +48,7 @@ use Bugzilla::CGI ();
use Bugzilla::Extension ();
use Bugzilla::Install::Requirements ();
use Bugzilla::Util ();
+use Bugzilla::RNG ();
# Make warnings go to the virtual host's log and not the main
# server log.
@@ -68,11 +68,11 @@ my $cgi_path = Bugzilla::Constants::bz_locations()->{'cgi_path'};
my $server = Apache2::ServerUtil->server;
my $conf = <<EOT;
# Make sure each httpd child receives a different random seed (bug 476622).
-# Math::Random::Secure has one srand that needs to be called for
+# Bugzilla::RNG has one srand that needs to be called for
# every process, and Perl has another. (Various Perl modules still use
-# the built-in rand(), even though we only use Math::Random::Secure in
-# Bugzilla itself, so we need to srand() both of them.)
-PerlChildInitHandler "sub { Math::Random::Secure::srand(); srand(); }"
+# the built-in rand(), even though we never use it in Bugzilla itself,
+# so we need to srand() both of them.)
+PerlChildInitHandler "sub { Bugzilla::RNG::srand(); srand(); }"
<Directory "$cgi_path">
AddHandler perl-script .cgi
# No need to PerlModule these because they're already defined in mod_perl.pl