From 9f52cd9456744b5fd97250dc8c5ee64caee31466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Sat, 6 Oct 2018 22:09:23 +0200 Subject: [PATCH] [Docker API] Fix sieve list for users, fixes #1849 --- data/Dockerfiles/dockerapi/server.py | 4 ++-- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/Dockerfiles/dockerapi/server.py b/data/Dockerfiles/dockerapi/server.py index 17e5e0fd..a161c8a6 100644 --- a/data/Dockerfiles/dockerapi/server.py +++ b/data/Dockerfiles/dockerapi/server.py @@ -86,14 +86,14 @@ class container_post(Resource): elif request.json['cmd'] == 'sieve_list' and request.json['username']: try: for container in docker_client.containers.list(filters={"id": container_id}): - sieve_return = container.exec_run(["/bin/bash", "-c", "/usr/local/bin/doveadm sieve list -u '" + request.json['username'].replace("'", "'\\''") + "'"], user='vmail') + sieve_return = container.exec_run(["/bin/bash", "-c", "/usr/local/bin/doveadm sieve list -u '" + request.json['username'].replace("'", "'\\''") + "'"]) return sieve_return.output except Exception as e: return jsonify(type='danger', msg=str(e)) elif request.json['cmd'] == 'sieve_print' and request.json['script_name'] and request.json['username']: try: for container in docker_client.containers.list(filters={"id": container_id}): - sieve_return = container.exec_run(["/bin/bash", "-c", "/usr/local/bin/doveadm sieve get -u '" + request.json['username'].replace("'", "'\\''") + "' '" + request.json['script_name'].replace("'", "'\\''") + "'"], user='vmail') + sieve_return = container.exec_run(["/bin/bash", "-c", "/usr/local/bin/doveadm sieve get -u '" + request.json['username'].replace("'", "'\\''") + "' '" + request.json['script_name'].replace("'", "'\\''") + "'"]) return sieve_return.output except Exception as e: return jsonify(type='danger', msg=str(e)) diff --git a/docker-compose.yml b/docker-compose.yml index b8237152..d9da7d35 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -364,7 +364,7 @@ services: - watchdog dockerapi-mailcow: - image: mailcow/dockerapi:1.18 + image: mailcow/dockerapi:1.19 restart: always build: ./data/Dockerfiles/dockerapi oom_kill_disable: true