--- loncom/publisher/loncfile.pm 2003/06/19 20:23:39 1.30 +++ loncom/publisher/loncfile.pm 2003/06/19 20:49:13 1.31 @@ -9,7 +9,7 @@ # and displays a page showing the results of the action. # # -# $Id: loncfile.pm,v 1.30 2003/06/19 20:23:39 albertel Exp $ +# $Id: loncfile.pm,v 1.31 2003/06/19 20:49:13 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -778,6 +778,12 @@ sub NewFile1 { } } + #remove bad characters + if ($newfilename=~/[\#\?&]/) { + $request->print("

Invalid characters in requested filename have been removed.

"); + $newfilename=~s/[\#\?&]//g; + } + my $fullpath = $dir.'/'.$newfilename; &Debug($request, "Full path is : ".$fullpath);