Fix for [ 1932310 ] security check always fail for windows.
git-svn-id: https://tftpy.svn.sourceforge.net/svnroot/tftpy/trunk@82 63283fd4-ec1e-0410-9879-cb7f675518da
This commit is contained in:
parent
596af4075f
commit
70f22b1ca1
1 changed files with 1 additions and 1 deletions
|
@ -289,7 +289,7 @@ class TftpServerHandler(TftpSession):
|
|||
self.filename = os.path.abspath(self.filename)
|
||||
logger.debug("The absolute path is %s" % self.filename)
|
||||
# Security check. Make sure it's prefixed by the tftproot.
|
||||
if re.match(r'%s' % self.root, self.filename):
|
||||
if self.filename.find(self.root) == 0:
|
||||
logger.debug("The path appears to be safe: %s" %
|
||||
self.filename)
|
||||
else:
|
||||
|
|
Reference in a new issue