Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1776

Show
Ignore:
Timestamp:
10/27/07 12:30:54
Author:
fumanchu
Message:

2.1 fix for #744 (Malicious cookies may allow access to files outside the session directory).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/cherrypy-2.1/cherrypy/lib/filter/sessionfilter.py

    r741 r1776  
    333333        fileName = self.SESSION_PREFIX + id 
    334334        filePath = os.path.join(storagePath, fileName) 
     335        if not os.path.normpath(filePath).startswith(storagePath): 
     336            raise cherrypy.HTTPError(400, "Invalid session id in cookie.") 
    335337        return filePath 
    336338     

Hosted by WebFaction

Log in as guest/cpguest to create tickets