From 18876c0ef60d83bbbd3dab922d1f101b0f9ebaab Mon Sep 17 00:00:00 2001
From: Magnus Giesbert <magnus@fsmpi.rwth-aachen.de>
Date: Thu, 9 Jun 2022 20:35:25 +0200
Subject: [PATCH] Resolve "Fehler in "Pushing to Wiki" kann Passwort enthalten"

---
 tasks.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tasks.py b/tasks.py
index 5cd829b..5612ca2 100644
--- a/tasks.py
+++ b/tasks.py
@@ -645,6 +645,12 @@ def push_to_dokuwiki_async(protocol_id, content, summary):
                     return _make_error(
                         protocol, "Pushing to Wiki",
                         "Pushing to Wiki failed." "")
+            except xmlrpc.client.ProtocolError as prot_err: # makes sure the WIKI_API_URL does not get leaked
+                error_msg = "A ProtocolError occurred with code:'{}'; and Message:'{}'".format(
+                    prot_err.errcode, prot_err.errmsg)
+                return _make_error(
+                    protocol, "Pushing to Wiki", "XML RPC ProtocolError",
+                    error_msg)
             except xmlrpc.client.Error as exception:
                 return _make_error(
                     protocol, "Pushing to Wiki", "XML RPC Exception",
-- 
GitLab