Thu Feb 23 18:51:21 UTC 2006 Alberto Bertogli * Quote filenames in several places. There were several places using filenames in URLs without quoting them properly, this fixes them. Thanks to VMiklos for the report. diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi --- old-darcsweb/darcsweb.cgi 2015-10-10 21:17:58.000000000 +0000 +++ new-darcsweb/darcsweb.cgi 2015-10-10 21:17:58.000000000 +0000 @@ -355,6 +355,7 @@ """ % { "myreponame": config.myreponame, 'hash': h } realf = realpath(f) + f = urllib.quote(f) if f and h: print """ @@ -1607,12 +1608,13 @@ print """ - %(file)s + %(fname)s """ % { 'myreponame': config.myreponame, 'hash': p.hash, - 'file': f + 'file': urllib.quote(f), + 'fname': escape(f), } else: print "%s" % f @@ -1662,7 +1664,7 @@ """ % { 'myreponame': config.myreponame, 'hash': p.hash, - 'file': f + 'file': urllib.quote(f) } print '' print '' @@ -1687,7 +1689,7 @@ if not p: continue sofar += '/' + p print '%s /' % \ - (config.myreponame, escape(sofar), p) + (config.myreponame, urllib.quote(sofar), p) print """ @@ -1721,20 +1723,21 @@ print '' alt = not alt realfile = path + f + fullf = filter_file(dname + '/' + f) print '', fperms(realfile), print '' if f in dlist: print """ - %(f)s + %(f)s - history | - tree + history | + tree """ % { 'myrname': config.myreponame, 'f': escape(f), - 'newf': filter_file(dname + '/' + f), + 'fullf': urllib.quote(fullf), } else: print """ @@ -1747,7 +1750,7 @@ """ % { 'myrname': config.myreponame, 'f': escape(f), - 'fullf': filter_file(dname + '/' + f), + 'fullf': urllib.quote(fullf), } print '' print ''