[LON-CAPA-cvs] cvs: loncom /interface lonmsg.pm lonsupportreq.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 09 Jul 2004 21:08:25 -0000


albertel		Fri Jul  9 17:08:25 2004 EDT

  Modified files:              
    /loncom/interface	lonsupportreq.pm lonmsg.pm 
  Log:
  - stupid %ENV problem again
  
  
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.3 loncom/interface/lonsupportreq.pm:1.4
--- loncom/interface/lonsupportreq.pm:1.3	Sat Jul  3 16:57:05 2004
+++ loncom/interface/lonsupportreq.pm	Fri Jul  9 17:08:24 2004
@@ -529,10 +529,16 @@
 #        }
 #    }
     $msg->subject('[LON-CAPA] - support request');
+    # ->open can cause an sh launch which can pass all of %ENV allong
+    # which can be to large for /bin/sh's little mind
+    my %oldENV=%ENV;
+    undef(%ENV);
     if (my $fh = $msg->open()) {
-        print $fh $supportmsg;
+	print $fh $supportmsg;
         $fh->close;
     }
+    %ENV=%oldENV;
+    undef(%oldENV);
     $r->print(<<END);
  <b>Your support request contained the following information</b>:<br /><br />
  <table width="580" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.102 loncom/interface/lonmsg.pm:1.103
--- loncom/interface/lonmsg.pm:1.102	Wed Jun  2 16:40:07 2004
+++ loncom/interface/lonmsg.pm	Fri Jul  9 17:08:24 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.102 2004/06/02 20:40:07 raeburn Exp $
+# $Id: lonmsg.pm,v 1.103 2004/07/09 21:08:24 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -219,10 +219,14 @@
     my $msg = new Mail::Send;
     $msg->to($to);
     $msg->subject('[LON-CAPA] '.$subject);
+    my %oldENV=%ENV;
+    undef(%ENV);
     if (my $fh = $msg->open()) {
 	print $fh $body;
 	$fh->close;
     }
+    %ENV=%oldENV;
+    undef(%oldENV);
 }
 
 # ==================================================== Send notification emails