Commit fc40d2e6 authored by Daniel STAN's avatar Daniel STAN
Browse files

server: évite de bricker la bdd

Avec nawak dans le contents
parent 34aa2a64
......@@ -178,6 +178,11 @@ def _putfile(filename, roles, contents):
notification(u"Modification de %s" % filename, corps, filename, old)
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}))
return [True, u"Modification effectuée."]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment