Prevent install of an empty package
authorJamie Cameron <jcameron@webmin.com>
Tue, 29 Jun 2010 20:33:48 +0000 (13:33 -0700)
committerJamie Cameron <jcameron@webmin.com>
Tue, 29 Jun 2010 20:33:48 +0000 (13:33 -0700)
software/install_pack.cgi
software/lang/en

index e357753..7394563 100755 (executable)
@@ -73,6 +73,7 @@ elsif ($in{source} == 2) {
 elsif ($in{'source'} == 3) {
        # installing from some update system
        &clean_environment();
+       $in{'update'} =~ /\S/ || &error($text{'install_eupdate'});
        @packs = &update_system_install($in{'update'}, \%in);
        &reset_environment();
 
index f46cd74..cba52c1 100644 (file)
@@ -90,6 +90,7 @@ install_elocal=No local file given
 install_elocal2='$1' does not exist
 install_eupload=Your browser does not support file uploads
 install_eurl=Incomprehensible URL '$1'
+install_eupdate=No package to install entered
 install_edir=Not a valid $1 directory
 install_ezip=Not a valid compressed or gzipped $1 file
 install_efile=Not a valid $1 file