Revision: 7832
          http://sourceforge.net/p/ipcop/svn/7832
Author:   owes
Date:     2015-01-27 20:36:40 +0000 (Tue, 27 Jan 2015)
Log Message:
-----------
Display errorbox when trying to upload empty filename

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

Modified: ipcop/trunk/html/cgi-bin/updates.cgi
===================================================================
--- ipcop/trunk/html/cgi-bin/updates.cgi        2015-01-27 20:02:02 UTC (rev 
7831)
+++ ipcop/trunk/html/cgi-bin/updates.cgi        2015-01-27 20:36:40 UTC (rev 
7832)
@@ -19,7 +19,7 @@
 # (c) The SmoothWall Team
 #
 # With many, many changes since 2001,
-# (c) 2001-2014, the IPCop team
+# (c) 2001-2015, the IPCop team
 #
 # $Id$
 #
@@ -101,7 +101,10 @@
 
     &General::log("installpackage", "Upload update: $uploadsettings{'FH'}");
 
-    if (copy($uploadsettings{'FH'}, "/var/patches/$uploadsettings{'FH'}") != 
1) {
+    if ($uploadsettings{'FH'} eq '') {
+        $errormessage = $Lang::tr{'there was no file upload'};
+    }
+    elsif (copy($uploadsettings{'FH'}, "/var/patches/$uploadsettings{'FH'}") 
!= 1) {
        $errormessage = $!;
        &General::log("installpackage", "Upload error: $errormessage");
     }

Modified: ipcop/trunk/updates/2.2.0/ROOTFILES.i486-2.2.0
===================================================================
--- ipcop/trunk/updates/2.2.0/ROOTFILES.i486-2.2.0      2015-01-27 20:02:02 UTC 
(rev 7831)
+++ ipcop/trunk/updates/2.2.0/ROOTFILES.i486-2.2.0      2015-01-27 20:36:40 UTC 
(rev 7832)
@@ -1,5 +1,6 @@
 ## please place IPCop files first, then packages sorted by alphabetical order
 ##
+/home/httpd/cgi-bin/updates.cgi
 ## ethtool-3.18
 /usr/sbin/ethtool
 ##

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


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to