From cb08c198ad3c349d34a0ddd6b20a180e8162a4b0 Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Fri, 28 Jul 2023 18:44:47 +0300 Subject: [PATCH] Force rendering of error messages as plain text Make the `error_label` widget always render messages as plain text, instead of auto discovering if the text is rich. We need this because the error message may contain input from the sandbox, which we consider untrusted. --- dangerzone/gui/main_window.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dangerzone/gui/main_window.py b/dangerzone/gui/main_window.py index e1b6e12..1aac928 100644 --- a/dangerzone/gui/main_window.py +++ b/dangerzone/gui/main_window.py @@ -988,6 +988,7 @@ class DocumentWidget(QtWidgets.QWidget): self.error_label = QtWidgets.QLabel() self.error_label.setAlignment(QtCore.Qt.AlignVCenter | QtCore.Qt.AlignLeft) self.error_label.setWordWrap(True) + self.error_label.setTextFormat(QtCore.Qt.PlainText) self.error_label.hide() # only show on error # Progress bar