--- loncom/lonnet/perl/lonnet.pm 2003/01/10 20:55:44 1.316 +++ loncom/lonnet/perl/lonnet.pm 2003/02/01 19:47:37 1.317.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.316 2003/01/10 20:55:44 www Exp $ +# $Id: lonnet.pm,v 1.317.2.1 2003/02/01 19:47:37 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -864,7 +864,7 @@ sub userfileupload { # Replace spaces by underscores $fname=~s/\s+/\_/g; # Replace all other weird characters by nothing - $fname=~s/[^\w\.\-\+]//g; + $fname=~s/[^\w\.\-]//g; # See if there is anything left unless ($fname) { return 'error: no uploaded file'; } chop($ENV{'form.'.$formname}); @@ -2766,14 +2766,14 @@ sub EXT { } else { $courseid=$ENV{'request.course.id'}; } - my ($realm,$space,$qualifier,@therest)=split(/\./,$varname); my $rest; - if ($therest[0]) { + if (defined($therest[0])) { $rest=join('.',@therest); } else { $rest=''; } + my $qualifierrest=$qualifier; if ($rest) { $qualifierrest.='.'.$rest; } my $spacequalifierrest=$space;