Forcing decode mode to lower case, fixes bug 17.

master
Michael P. Soulier 2010-10-13 18:46:29 -04:00
parent 45185ed44c
commit 4396124b8d
1 changed files with 3 additions and 3 deletions

View File

@ -191,10 +191,10 @@ class TftpPacketInitial(TftpPacket, TftpPacketWithOptions):
mystruct = struct.unpack(format, shortbuf)
tftpassert(len(mystruct) == 2, "malformed packet")
log.debug("setting filename to %s" % mystruct[0])
log.debug("setting mode to %s" % mystruct[1])
self.filename = mystruct[0]
self.mode = mystruct[1]
self.mode = mystruct[1].lower() # force lc - bug 17
log.debug("set filename to %s" % self.filename)
log.debug("set mode to %s" % self.mode)
self.options = self.decode_options(subbuf[tlength+1:])
return self