Skip to content

Commit

Permalink
- Merge CGI escapes from 2.6 / 2.7 audit.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Jan 15, 2004
1 parent 0e32def commit 10f9bde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion AcceleratedHTTPCacheManager.py
Expand Up @@ -24,6 +24,7 @@
import Globals
from Globals import DTMLFile
import urlparse, httplib
from cgi import escape
from urllib import quote
from App.Common import rfc1123_date

Expand Down Expand Up @@ -213,7 +214,7 @@ def sort_link(self, name, id):
if sort_by == id:
newsr = not sort_reverse
url = url + '&sort_reverse=' + (newsr and '1' or '0')
return '<a href="%s">%s</a>' % (url, name)
return '<a href="%s">%s</a>' % (escape(url, 1), escape(name))


Globals.default__class_init__(AcceleratedHTTPCacheManager)
Expand Down
3 changes: 2 additions & 1 deletion RAMCacheManager.py
Expand Up @@ -21,6 +21,7 @@
from OFS.Cache import Cache, CacheManager
from OFS.SimpleItem import SimpleItem
from thread import allocate_lock
from cgi import escape
import time
import Globals
from Globals import DTMLFile
Expand Down Expand Up @@ -433,7 +434,7 @@ def sort_link(self, name, id):
if sort_by == id:
newsr = not sort_reverse
url = url + '&sort_reverse=' + (newsr and '1' or '0')
return '<a href="%s">%s</a>' % (url, name)
return '<a href="%s">%s</a>' % (escape(url, 1), escape(name))

Globals.default__class_init__(RAMCacheManager)

Expand Down

0 comments on commit 10f9bde

Please sign in to comment.