From 1d091fcec0fb8a78fe5b6a640c67a17a85c06092 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Tue, 4 Aug 2015 11:16:41 -0700 Subject: de-randomization fixes for testing, #37340 --- httemplate/elements/bill.html | 2 +- httemplate/elements/columnstart.html | 2 +- httemplate/elements/create_uri_query | 2 +- httemplate/elements/input-fcc_options.html | 2 +- httemplate/elements/pickcolor.html | 2 +- httemplate/elements/popup_link_onclick.html | 2 +- httemplate/elements/progress-init.html | 2 +- httemplate/elements/tr-input-mask.html | 2 +- httemplate/graph/elements/report.html | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) (limited to 'httemplate') diff --git a/httemplate/elements/bill.html b/httemplate/elements/bill.html index 64a1a6d2c..420a7489b 100644 --- a/httemplate/elements/bill.html +++ b/httemplate/elements/bill.html @@ -45,7 +45,7 @@ my $label = $opt{'label'}; # formname no longer needs to be passed from outside, but we still # need one and it needs to be unique my $formname = $opt{'formname'} || - 'bill'.sprintf('%04d',int(rand(10000))).$custnum; + 'bill'.sprintf('%04d',random_id(4)).$custnum; my $url = $opt{'url'} || ''; my $message = $opt{'message'} || 'Finished!'; my $bill_opts = $opt{'bill_opts'} || {}; diff --git a/httemplate/elements/columnstart.html b/httemplate/elements/columnstart.html index 1ffbcb9e8..245c308a7 100644 --- a/httemplate/elements/columnstart.html +++ b/httemplate/elements/columnstart.html @@ -10,7 +10,7 @@ Pass 'aligned' => 1 to have corresponding rows in the columns line up. -% my $id = sprintf('table%08d', rand(100000000)); +% my $id = sprintf('table%08d', random_id(8)); diff --git a/httemplate/elements/create_uri_query b/httemplate/elements/create_uri_query index ce6249e0e..414d53ba4 100644 --- a/httemplate/elements/create_uri_query +++ b/httemplate/elements/create_uri_query @@ -18,7 +18,7 @@ my $query = $cgi->query_string; if ( length($query) > 1920 || $opt{secure} ) { #stupid IE 2083 URL limit - my $session = int(rand(4294967296)); #XXX + my $session = random_id(9); my $pref = new FS::access_user_pref({ 'usernum' => $FS::CurrentUser::CurrentUser->usernum, 'prefname' => "redirect$session", diff --git a/httemplate/elements/input-fcc_options.html b/httemplate/elements/input-fcc_options.html index 064c647fc..080b40f88 100644 --- a/httemplate/elements/input-fcc_options.html +++ b/httemplate/elements/input-fcc_options.html @@ -9,7 +9,7 @@ % } % unless ($opt{html_only}) { % my $popup = $fsurl.'misc/part_pkg_fcc_options.html?id='; -% my $popup_name = 'popup-'.time. "-$$-". rand() * 2**32; +% my $popup_name = 'popup-'.random_id();