From 03c014f41406c981122b2bb1d677da08336d5a50 Mon Sep 17 00:00:00 2001 From: dadav <33197631+dadav@users.noreply.github.com> Date: Wed, 1 Apr 2020 18:20:12 +0200 Subject: [PATCH] fix webcfg --- pwnagotchi/plugins/default/webcfg.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pwnagotchi/plugins/default/webcfg.py b/pwnagotchi/plugins/default/webcfg.py index ba79078..c8f1e04 100644 --- a/pwnagotchi/plugins/default/webcfg.py +++ b/pwnagotchi/plugins/default/webcfg.py @@ -499,12 +499,11 @@ class WebConfig(plugins.Plugin): elif request.method == "POST": if path == "save-config": try: - parsed_toml = toml.loads(request.get_json()) + parsed_toml = json.loads(request.get_json()) save_config(parsed_toml, '/etc/pwnagotchi/config.toml') - _thread.start_new_thread(restart, (self.mode,)) return "success" except Exception as ex: logging.error(ex) - return "config error" + return "config error", 500 abort(404)