mirror of https://github.com/dirtbags/moth.git
Fixed path escaping for tanks.wq
This commit is contained in:
parent
39d7b98852
commit
750e8f4715
|
@ -40,7 +40,7 @@ class Pflanzarr:
|
|||
tmpPlayers = os.listdir(self._playerDir)
|
||||
players = []
|
||||
for p in tmpPlayers:
|
||||
p = unquote(p)
|
||||
p = unquote(p, safe='')
|
||||
if not (p.startswith('.') or p.endswith('#') or p.endswith('~'))\
|
||||
and p in colors:
|
||||
players.append(p)
|
||||
|
@ -401,7 +401,7 @@ class Pflanzarr:
|
|||
colors = {}
|
||||
for line in file:
|
||||
try:
|
||||
team, passwd, color = map(unquote, line.split('\t'))
|
||||
team, passwd, color = map(unquote, line.split('\t'),['']*3)
|
||||
colors[team] = '#%s' % color
|
||||
except:
|
||||
colors[team] = errorColor
|
||||
|
|
|
@ -49,7 +49,7 @@ if team not in teams.teams:
|
|||
if passwd != teams.teams[team][0]:
|
||||
print('<p>Invalid password.</p>'); done()
|
||||
|
||||
path = os.path.join(Config.DATA_PATH, 'ai/players', quote(team) )
|
||||
path = os.path.join(Config.DATA_PATH, 'ai/players', quote(team, safe='') )
|
||||
file = open(path, 'w')
|
||||
file.write(code)
|
||||
file.close()
|
||||
|
|
Loading…
Reference in New Issue