summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-11-17 17:10:06 -0800
committerIvan Kohler <ivan@freeside.biz>2013-11-17 17:10:06 -0800
commitd4cdc4db87f1b6a373398b7ab33e791bd0527dda (patch)
tree899459b98e0b15bee54d0b67a41e6eed189e199f /FS
parent0076a0d790d1385cd2a16472ec2c11528edbc9e3 (diff)
don't redirect to a GET with sensitive data, RT#26099
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Record.pm4
-rw-r--r--FS/bin/freeside-queued3
2 files changed, 5 insertions, 2 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 05deaef1e..493734729 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -1251,7 +1251,7 @@ sub insert {
}
my $h_sth;
- if ( defined dbdef->table('h_'. $table) ) {
+ if ( defined( dbdef->table('h_'. $table) ) && ! $no_history ) {
my $h_statement = $self->_h_statement('insert');
warn "[debug]$me $h_statement\n" if $DEBUG > 2;
$h_sth = dbh->prepare($h_statement) or do {
@@ -3004,7 +3004,7 @@ You should generally not have to worry about calling this, as the system handles
sub encrypt {
my ($self, $value) = @_;
- my $encrypted;
+ my $encrypted = $value;
if ($conf->exists('encryption')) {
if ($self->is_encrypted($value)) {
diff --git a/FS/bin/freeside-queued b/FS/bin/freeside-queued
index 5eac06b24..f1a87cac9 100644
--- a/FS/bin/freeside-queued
+++ b/FS/bin/freeside-queued
@@ -12,6 +12,7 @@ use FS::Record qw(qsearch);
use FS::queue;
use FS::queue_depend;
use FS::Log;
+use FS::Cron::expire_user_pref qw( expire_user_pref );
# no autoloading for non-FS classes...
use Net::SSH 0.07;
@@ -66,6 +67,7 @@ while (1) {
if ( $kids >= $max_kids ) {
warn "WARNING: maximum $kids children reached\n" unless $warnkids++;
&reap_kids;
+ expire_user_pref() unless $warnkids % 10;
sleep 1; #waiting for signals is cheap
next;
}
@@ -131,6 +133,7 @@ while (1) {
undef $FS::UID::dbh;
next;
};
+ expire_user_pref();
sleep $sleep_time;
next;
}