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

raeburn raeburn at source.lon-capa.org
Sun Jan 31 11:40:24 EST 2016


raeburn		Sun Jan 31 16:40:24 2016 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Keys and values in ids.db are escaped so &idput() needs to escape the ids
    in the query, and unescape the values in the response. 
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1298 loncom/lonnet/perl/lonnet.pm:1.1299
--- loncom/lonnet/perl/lonnet.pm:1.1298	Tue Jan 26 20:17:53 2016
+++ loncom/lonnet/perl/lonnet.pm	Sun Jan 31 16:40:22 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1298 2016/01/26 20:17:53 raeburn Exp $
+# $Id: lonnet.pm,v 1.1299 2016/01/31 16:40:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1559,7 +1559,7 @@
     
     my %servers = &get_servers($udom,'library');
     foreach my $tryserver (keys(%servers)) {
-	my $idlist=join('&', at ids);
+	my $idlist=join('&', map { &escape($_); } @ids);
 	$idlist=~tr/A-Z/a-z/; 
 	my $reply=&reply("idget:$udom:".$idlist,$tryserver);
 	my @answer=();
@@ -1569,7 +1569,7 @@
 	my $i;
 	for ($i=0;$i<=$#ids;$i++) {
 	    if ($answer[$i]) {
-		$returnhash{$ids[$i]}=$answer[$i];
+		$returnhash{$ids[$i]}=&unescape($answer[$i]);
 	    } 
 	}
     } 




More information about the LON-CAPA-cvs mailing list