Revision: 5892
          http://ipcop.svn.sourceforge.net/ipcop/?rev=5892&view=rev
Author:   owes
Date:     2011-10-03 13:18:32 +0000 (Mon, 03 Oct 2011)
Log Message:
-----------
Fix use of regex for 'special' characters. Fix use of language reload.

Modified Paths:
--------------
    ipcop/trunk/html/cgi-bin/email.cgi
    ipcop/trunk/updates/2.0.1/ROOTFILES.i486-2.0.1

Modified: ipcop/trunk/html/cgi-bin/email.cgi
===================================================================
--- ipcop/trunk/html/cgi-bin/email.cgi  2011-10-03 12:45:33 UTC (rev 5891)
+++ ipcop/trunk/html/cgi-bin/email.cgi  2011-10-03 13:18:32 UTC (rev 5892)
@@ -25,6 +25,7 @@
 
 # enable only the following on debugging purpose
 use warnings;
+no warnings 'once';
 use CGI::Carp 'fatalsToBrowser';
 
 require '/usr/lib/ipcop/general-functions.pl';
@@ -45,6 +46,7 @@
 &Header::showhttpheaders();
 
 # Init parameters
+$cgiparams{'ACTION'}            = '';
 $cgiparams{'EMAIL_TO'}          = '';
 $cgiparams{'EMAIL_FROM'}        = '';
 $cgiparams{'EMAIL_USR'}         = '';
@@ -109,14 +111,14 @@
 
     my $subject = $Lang::tr{'subject test'};
 
-    unless($subject =~ 
/^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_:\.\+,\ 
]+$/) {
+    unless($subject =~ 
/^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\-\_\:\.\+,\ 
]+$/) {
         # found some problematic characters, use english subject text
         &Lang::reload(2);
 
         $subject = $Lang::tr{'subject test'};
 
         # switch back to selected language
-        &Lang::reload(0);
+        &Lang::reload(1);
     }
 
     # send test email

Modified: ipcop/trunk/updates/2.0.1/ROOTFILES.i486-2.0.1
===================================================================
--- ipcop/trunk/updates/2.0.1/ROOTFILES.i486-2.0.1      2011-10-03 12:45:33 UTC 
(rev 5891)
+++ ipcop/trunk/updates/2.0.1/ROOTFILES.i486-2.0.1      2011-10-03 13:18:32 UTC 
(rev 5892)
@@ -1,4 +1,5 @@
 ## please place IPCop files first, then packages sorted by alphabetical order
+/home/httpd/cgi-bin/email.cgi
 /home/httpd/cgi-bin/index.cgi
 /home/httpd/cgi-bin/logsummary.cgi
 /usr/lib/ipcop/lang.pl

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to