8 foreach my $param (grep /pay(info\d?|cvv)$/, $cgi->param) {
9 my $value = $cgi->param($param);
10 next unless length($value);
11 my $encrypted = FS::Record->encrypt( $value );
12 $cgi->param($param, $encrypted);
17 my $query = $cgi->query_string;
19 if ( length($query) > 1920 || $opt{secure} ) { #stupid IE 2083 URL limit
21 my $session = int(rand(4294967296)); #XXX
22 my $pref = new FS::access_user_pref({
23 'usernum' => $FS::CurrentUser::CurrentUser->usernum,
24 'prefname' => "redirect$session",
25 'prefvalue' => $query,
26 'expiration' => time + ( $opt{secure} ? 120 #2m?
30 local($FS::Record::no_history) = 1;
32 my $pref_error = $pref->insert;
34 die "FATAL: couldn't even set redirect cookie: $pref_error".
35 " attempting to set redirect$session to $query\n";
38 $query = "redirect=$session";