bagder: curl-www error404.cgi,1.3,1.4

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www
In directory labb:/tmp/cvs-serv27186

Modified Files:
	error404.cgi 
Log Message:
html escape input before showing


Index: error404.cgi
===================================================================
RCS file: /cvsroot/curl/curl-www/error404.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- error404.cgi	17 Sep 2004 08:40:28 -0000	1.3
+++ error404.cgi	12 May 2005 13:10:25 -0000	1.4
@@ -11,7 +11,7 @@
 
 &title("Oops! This document does not seem to exist!");
 
-print "<p>The document <b>$file</b> (that you requested) doesn't exist here.",
+print "<p>The document <b>".CGI::escapeHTML($file)."</b> (that you requested) doesn't exist here.",
     " It may have existed here earlier and",
     " is now removed, or it may never have existed.\n";
 
@@ -22,8 +22,9 @@
 }
 
 if(($referer ne "") && ($referer !~ /curl.haxx/)) {
+    my $ref = CGI::escapeHTML($referer);
     print "<p> It would be polite of you to contact the admins of <a href=",
-    "\"$referer\">$referer</a> and inform them about this problem.\n";
+    "\"$ref\">$ref</a> and inform them about this problem.\n";
 }
 
 print "<p> Sometimes search engines keep very old information that might have",

_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-www-commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.