From 09b6c20badbce4a2a949f040aea9d2d9a2109185 Mon Sep 17 00:00:00 2001 From: "andre.peters" Date: Sun, 14 Jan 2018 18:44:06 +0100 Subject: [PATCH] [DockerAPI] Hide stderr from rspamadm output --- data/Dockerfiles/dockerapi/server.py | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/Dockerfiles/dockerapi/server.py b/data/Dockerfiles/dockerapi/server.py index 25969681..7410c0ff 100644 --- a/data/Dockerfiles/dockerapi/server.py +++ b/data/Dockerfiles/dockerapi/server.py @@ -82,7 +82,7 @@ class container_post(Resource): elif request.json['cmd'] == 'worker_password' and request.json['raw']: try: for container in docker_client.containers.list(filters={"id": container_id}): - hash = container.exec_run(["/bin/bash", "-c", "/usr/bin/rspamadm pw -e -p '" + request.json['raw'].replace("'", "'\\''") + "'"], user='_rspamd') + hash = container.exec_run(["/bin/bash", "-c", "/usr/bin/rspamadm pw -e -p '" + request.json['raw'].replace("'", "'\\''") + "' 2> /dev/null"], user='_rspamd') f = open("/access.inc", "w") f.write('enable_password = "' + re.sub('[^0-9a-zA-Z\$]+', '', hash.rstrip()) + '";\n') f.close() diff --git a/docker-compose.yml b/docker-compose.yml index 074a4c8a..8eea2f8f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -328,7 +328,7 @@ services: - watchdog dockerapi-mailcow: - image: mailcow/dockerapi:1.4 + image: mailcow/dockerapi:1.5 restart: always build: ./data/Dockerfiles/dockerapi oom_score_adj: -10