summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/Record.pm6
-rw-r--r--FS/FS/UID.pm18
-rwxr-xr-xFS/bin/freeside-bill4
-rw-r--r--htetc/global.asa16
-rwxr-xr-xhttemplate/browse/agent.cgi4
-rwxr-xr-xhttemplate/browse/agent_type.cgi4
-rwxr-xr-xhttemplate/browse/cust_main_county.cgi4
-rwxr-xr-xhttemplate/browse/part_pkg.cgi4
-rwxr-xr-xhttemplate/browse/part_referral.cgi4
-rwxr-xr-xhttemplate/browse/svc_acct_pop.cgi4
10 files changed, 33 insertions, 35 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 8dbd4aff3..2c745b413 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -8,7 +8,7 @@ use Carp qw(carp cluck croak confess);
use File::CounterFile;
use Locale::Country;
use DBIx::DBSchema;
-use FS::UID qw(dbh checkruid swapuid getotaker datasrc driver_name);
+use FS::UID qw(dbh checkruid getotaker datasrc driver_name);
@ISA = qw(Exporter);
@EXPORT_OK = qw(dbh fields hfields qsearch qsearchs dbdef);
@@ -566,7 +566,6 @@ sub unique {
#warn "table $table is tainted" if is_tainted($table);
#warn "field $field is tainted" if is_tainted($field);
- &swapuid;
my($counter) = new File::CounterFile "$table.$field",0;
# hack for web demo
# getotaker() =~ /^([\w\-]{1,16})$/ or die "Illegal CGI REMOTE_USER!";
@@ -577,7 +576,6 @@ sub unique {
my($index)=$counter->inc;
$index=$counter->inc
while qsearchs($table,{$field=>$index}); #just in case
- &swapuid;
$index =~ /^(\d*)$/;
$index=$1;
@@ -971,7 +969,7 @@ sub DESTROY { return; }
=head1 VERSION
-$Id: Record.pm,v 1.24 2001-08-19 00:48:49 ivan Exp $
+$Id: Record.pm,v 1.25 2001-08-21 09:34:13 ivan Exp $
=head1 BUGS
diff --git a/FS/FS/UID.pm b/FS/FS/UID.pm
index 7ebe592c3..3e71f09f1 100644
--- a/FS/FS/UID.pm
+++ b/FS/FS/UID.pm
@@ -15,7 +15,7 @@ use DBI;
use FS::Conf;
@ISA = qw(Exporter);
-@EXPORT_OK = qw(checkeuid checkruid swapuid cgisuidsetup
+@EXPORT_OK = qw(checkeuid checkruid cgisuidsetup
adminsuidsetup getotaker dbh datasrc getsecrets driver_name );
$freeside_uid = scalar(getpwnam('freeside'));
@@ -31,7 +31,7 @@ FS::UID - Subroutines for database login and assorted other stuff
=head1 SYNOPSIS
use FS::UID qw(adminsuidsetup cgisuidsetup dbh datasrc getotaker
- checkeuid checkruid swapuid);
+ checkeuid checkruid);
adminsuidsetup $user;
@@ -84,8 +84,6 @@ sub adminsuidsetup {
'ChopBlanks' => 1,
} ) or die "DBI->connect error: $DBI::errstr\n";
- swapuid(); #go to non-privledged user if running setuid freeside
-
foreach ( keys %callback ) {
&{$callback{$_}};
}
@@ -212,16 +210,6 @@ sub checkruid {
( $< == $freeside_uid );
}
-=item swapuid
-
-Swaps real and effective UIDs.
-
-=cut
-
-sub swapuid {
- ($<,$>) = ($>,$<) if $< != $>;
-}
-
=item getsecrets [ USER ]
Sets the user to USER, if supplied.
@@ -261,7 +249,7 @@ coderef into the hash %FS::UID::callback :
=head1 VERSION
-$Id: UID.pm,v 1.7 2001-06-21 16:27:52 ivan Exp $
+$Id: UID.pm,v 1.8 2001-08-21 09:34:13 ivan Exp $
=head1 BUGS
diff --git a/FS/bin/freeside-bill b/FS/bin/freeside-bill
index 42991c4f8..3462fa149 100755
--- a/FS/bin/freeside-bill
+++ b/FS/bin/freeside-bill
@@ -4,7 +4,7 @@ use strict;
use Fcntl qw(:flock);
use Date::Parse;
use Getopt::Std;
-use FS::UID qw(adminsuidsetup swapuid);
+use FS::UID qw(adminsuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::cust_main;
@@ -114,7 +114,7 @@ customers. Otherwise, bills all customers.
=head1 VERSION
-$Id: freeside-bill,v 1.6 2000-06-24 00:28:30 ivan Exp $
+$Id: freeside-bill,v 1.7 2001-08-21 09:34:13 ivan Exp $
=head1 BUGS
diff --git a/htetc/global.asa b/htetc/global.asa
index beb6d02f0..d6e0bbea2 100644
--- a/htetc/global.asa
+++ b/htetc/global.asa
@@ -2,7 +2,8 @@ use strict;
use vars qw( $cgi $p );
use CGI;
use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
+use HTML::Entities;
+use FS::UID qw(cgisuidsetup dbh);
use FS::Record qw(qsearch qsearchs fields);
use FS::part_svc;
use FS::CGI qw(header menubar popurl table);
@@ -16,5 +17,16 @@ sub Script_OnStart {
sub Script_OnFlush {
my $ref = $Response->{BinaryRef};
- $$ref = $cgi->header( '-expires' => 'now' ) .$$ref;
+ $$ref = $cgi->header( '-expires' => 'now' ) . $$ref;
+# if ( dbh->can('sprintProfile') ) {
+
+ $$ref =~ s/<\/BODY>[\s\n]*<\/HTML>[\s\n]*$//i
+ or warn "can't remove";
+
+ $$ref .= '<PRE>'. encode_entities(dbh->sprintProfile()). '</PRE>';
+
+ $$ref .= '</BODY></HTML>';
+
+ dbh->{'private_profile'} = {};
+# }
}
diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi
index 23c8f7c5b..138b61365 100755
--- a/httemplate/browse/agent.cgi
+++ b/httemplate/browse/agent.cgi
@@ -1,11 +1,11 @@
<%
-#<!-- $Id: agent.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: agent.cgi,v 1.3 2001-08-21 09:34:13 ivan Exp $ -->
use strict;
use vars qw( $ui $cgi $p $agent );
use CGI;
use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup swapuid);
+use FS::UID qw(cgisuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::CGI qw(header menubar table popurl);
use FS::agent;
diff --git a/httemplate/browse/agent_type.cgi b/httemplate/browse/agent_type.cgi
index 0d7c11f3e..4917e77a2 100755
--- a/httemplate/browse/agent_type.cgi
+++ b/httemplate/browse/agent_type.cgi
@@ -1,11 +1,11 @@
<%
-#<!-- $Id: agent_type.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: agent_type.cgi,v 1.3 2001-08-21 09:34:13 ivan Exp $ -->
use strict;
use vars qw( $cgi $p $agent_type );
use CGI;
use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup swapuid);
+use FS::UID qw(cgisuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::CGI qw(header menubar popurl table);
use FS::agent_type;
diff --git a/httemplate/browse/cust_main_county.cgi b/httemplate/browse/cust_main_county.cgi
index 9cce67da2..f7c749c1f 100755
--- a/httemplate/browse/cust_main_county.cgi
+++ b/httemplate/browse/cust_main_county.cgi
@@ -1,11 +1,11 @@
<%
-#<!-- $Id: cust_main_county.cgi,v 1.2 2001-08-17 11:05:31 ivan Exp $ -->
+#<!-- $Id: cust_main_county.cgi,v 1.3 2001-08-21 09:34:13 ivan Exp $ -->
use strict;
use vars qw( $cgi $p $cust_main_county );
use CGI;
use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup swapuid);
+use FS::UID qw(cgisuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::CGI qw(header menubar popurl table);
use FS::cust_main_county;
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index ef6a44620..b6e47b171 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -1,11 +1,11 @@
<%
-#<!-- $Id: part_pkg.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: part_pkg.cgi,v 1.3 2001-08-21 09:34:13 ivan Exp $ -->
use strict;
use vars qw( $cgi $p $part_pkg );
use CGI;
use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup swapuid);
+use FS::UID qw(cgisuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::CGI qw(header menubar popurl table);
use FS::part_pkg;
diff --git a/httemplate/browse/part_referral.cgi b/httemplate/browse/part_referral.cgi
index 8c2e26321..ed3b7a0e4 100755
--- a/httemplate/browse/part_referral.cgi
+++ b/httemplate/browse/part_referral.cgi
@@ -1,11 +1,11 @@
<%
-#<!-- $Id: part_referral.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: part_referral.cgi,v 1.3 2001-08-21 09:34:13 ivan Exp $ -->
use strict;
use vars qw( $cgi $p $part_referral );
use CGI;
use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup swapuid);
+use FS::UID qw(cgisuidsetup);
use FS::Record qw(qsearch);
use FS::CGI qw(header menubar popurl table);
use FS::part_referral;
diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi
index 76baf8883..0e6937f6c 100755
--- a/httemplate/browse/svc_acct_pop.cgi
+++ b/httemplate/browse/svc_acct_pop.cgi
@@ -1,11 +1,11 @@
<%
-#<!-- $Id: svc_acct_pop.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: svc_acct_pop.cgi,v 1.3 2001-08-21 09:34:13 ivan Exp $ -->
use strict;
use vars qw( $cgi $p $svc_acct_pop );
use CGI;
use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup swapuid);
+use FS::UID qw(cgisuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::CGI qw(header menubar table popurl);
use FS::svc_acct_pop;