Diff for /loncom/publisher/loncfile.pm between versions 1.31 and 1.32

version 1.31, 2003/06/19 20:49:13 version 1.32, 2003/06/19 21:04:37
Line 387  sub checksuffix { Line 387  sub checksuffix {
     }      }
     return $result;      return $result;
 }  }
   
   sub cleanDest {
       my ($request,$dest)=@_;
       #remove bad characters
       if  ($dest=~/[\#\?&]/) {
    $request->print("<p><font color=\"red\">Invalid characters in requested name have been removed.</font></p>");
    $dest=~s/[\#\?&]//g;
       }
       return $dest;
   }
   
 =pod  =pod
   
 =item CloseForm1($request, $user, $file)  =item CloseForm1($request, $user, $file)
Line 778  sub NewFile1 { Line 789  sub NewFile1 {
  }   }
     }      }
   
     #remove bad characters  
     if  ($newfilename=~/[\#\?&]/) {  
  $request->print("<p><font color=\"red\">Invalid characters in requested filename have been removed.</font></p>");  
  $newfilename=~s/[\#\?&]//g;  
     }  
   
     my $fullpath = $dir.'/'.$newfilename;      my $fullpath = $dir.'/'.$newfilename;
   
     &Debug($request, "Full path is : ".$fullpath);      &Debug($request, "Full path is : ".$fullpath);
Line 842  sub phaseone { Line 847  sub phaseone {
       
   #  my $conspace=ConstructionPathFromRelative($uname, $fn);    #  my $conspace=ConstructionPathFromRelative($uname, $fn);
       
       $ENV{'form.newfilename'}=&cleanDest($r,$ENV{'form.newfilename'});
   
   $r->print('<form action="/adm/cfile" method="post">'.    $r->print('<form action="/adm/cfile" method="post">'.
     '<input type="hidden" name="filename" value="/~'.$uname.$fn.'" />'.      '<input type="hidden" name="filename" value="/~'.$uname.$fn.'" />'.
     '<input type="hidden" name="phase" value="two" />'.      '<input type="hidden" name="phase" value="two" />'.

Removed from v.1.31  
changed lines
  Added in v.1.32


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>