[LON-CAPA-cvs] cvs: loncom(version_1_2_X) /lonnet/perl lonnet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 25 Aug 2004 16:05:11 -0000


albertel		Wed Aug 25 12:05:11 2004 EDT

  Modified files:              (Branch: version_1_2_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - backport 1.532
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.523 loncom/lonnet/perl/lonnet.pm:1.523.2.1
--- loncom/lonnet/perl/lonnet.pm:1.523	Thu Jul 22 18:12:06 2004
+++ loncom/lonnet/perl/lonnet.pm	Wed Aug 25 12:05:10 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.523 2004/07/22 22:12:06 raeburn Exp $
+# $Id: lonnet.pm,v 1.523.2.1 2004/08/25 16:05:10 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1047,6 +1047,7 @@
 sub subscribe {
     my $fname=shift;
     if ($fname=~/\/(aboutme|syllabus|bulletinboard|smppg)$/) { return ''; }
+    $fname=~s/[\n\r]//g;
     my $author=$fname;
     $author=~s/\/home\/httpd\/html\/res\/([^\/]*)\/([^\/]*).*/$1\/$2/;
     my ($udom,$uname)=split(/\//,$author);
@@ -1067,6 +1068,7 @@
     my $filename=shift;
     $filename=~s/\/+/\//g;
     if ($filename=~/^\/home\/httpd\/html\/adm\//) { return OK; }
+    $filename=~s/[\n\r]//g;
     my $transname="$filename.in.transfer";
     if ((-e $filename) || (-e $transname)) { return OK; }
     my $remoteurl=subscribe($filename);