From fc40d2e6c904ef2b23e8ac1ff92d3de1bd6ef275 Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Sun, 12 Jan 2014 19:58:11 +0100 Subject: [PATCH] =?UTF-8?q?server:=20=C3=A9vite=20de=20bricker=20la=20bdd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avec nawak dans le contents --- server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.py b/server.py index 645616e..d18f255 100755 --- a/server.py +++ b/server.py @@ -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."]