From ff394d511497ff462294c5434c1ccf857e1a235f Mon Sep 17 00:00:00 2001 From: mickael e Date: Mon, 25 Nov 2019 15:49:51 -0500 Subject: [PATCH] Explitly set TextFormat to Plaintext for SecureQLabel Presence of a `<` would result in the AutoText [1] to result in improper rendering of the Label, resulting in a segmentation fault (see #628). Setting the format to plaintext not only resolves this issue but also provides defense-in-depth to ensure RichText is not displayed. [1]: https://doc.qt.io/qt-5/qt.html#TextFormat-enum --- securedrop_client/gui/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/securedrop_client/gui/__init__.py b/securedrop_client/gui/__init__.py index 86bbd0e9f..10d13f67e 100644 --- a/securedrop_client/gui/__init__.py +++ b/securedrop_client/gui/__init__.py @@ -156,6 +156,7 @@ def __init__( flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags(), ): super().__init__(parent, flags) + self.setTextFormat(Qt.PlainText) self.setText(text) def setText(self, text: str) -> None: