server: évite de bricker la bdd
Avec nawak dans le contents
This commit is contained in:
parent
34aa2a6469
commit
fc40d2e6c9
1 changed files with 5 additions and 0 deletions
|
@ -178,6 +178,11 @@ def _putfile(filename, roles, contents):
|
||||||
notification(u"Modification de %s" % filename, corps, filename, old)
|
notification(u"Modification de %s" % filename, corps, filename, old)
|
||||||
|
|
||||||
filepath = getpath(filename)
|
filepath = getpath(filename)
|
||||||
|
if type(contents) not in [unicode, str]: # fix that later
|
||||||
|
return [False, u"Erreur: merci de patcher votre cpasswords !"
|
||||||
|
+ "(contents should be encrypted str)"]
|
||||||
|
# Or fuck yourself
|
||||||
|
|
||||||
writefile(filepath, json.dumps({'roles': roles, 'contents': contents}))
|
writefile(filepath, json.dumps({'roles': roles, 'contents': contents}))
|
||||||
return [True, u"Modification effectuée."]
|
return [True, u"Modification effectuée."]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue