Clean input
authorJamie Cameron <jcameron@webmin.com>
Sun, 11 Jan 2009 23:07:00 +0000 (23:07 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sun, 11 Jan 2009 23:07:00 +0000 (23:07 +0000)
cpan/download.cgi

index 3ff58fb..dd2ab2e 100755 (executable)
@@ -65,6 +65,8 @@ elsif ($in{'source'} == 2) {
 elsif ($in{'source'} == 3) {
        # installing from CPAN.. find the module, and then install it
        $in{'cpan'} || &error($text{'download_emodname'});
+       $in{'cpan'} =~ s/^\s+//;
+       $in{'cpan'} =~ s/\s+$//;
        @cpan = split(/\s+|\0/, $in{'cpan'});
 
        # First check if YUM or APT can install this module for us