Skip to content

Commit 20e3b9a

Browse files
committed
Merge #12617: gui: Show messages as text not html
6fbc098 gui: Show messages as text not html (Wladimir J. van der Laan) Pull request description: Currently, error messages (such as InitError) are displayed as-is, which means Qt does auto detection on the format. This means that it's possible to inject HTML from the command line though e.g. specifying a wallet name with HTML in it. This isn't a direct security risk because fetching content from internet is disabled (and as far as I know we never report strings received from the network this way). However, it can be confusing. So explicitly force the format as text. Tree-SHA512: 96c9196f20552544b862071bca61817ef03653019cc3548023d435f3a9c48b6cd501fab3246783cb0be68c8c7bb1b865913d92070a7c4e84e82c6577709f0934
2 parents f13d756 + 6fbc098 commit 20e3b9a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/qt/bitcoingui.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,7 @@ void BitcoinGUI::message(const QString &title, const QString &message, unsigned
923923

924924
showNormalIfMinimized();
925925
QMessageBox mBox(static_cast<QMessageBox::Icon>(nMBoxIcon), strTitle, message, buttons, this);
926+
mBox.setTextFormat(Qt::PlainText);
926927
int r = mBox.exec();
927928
if (ret != nullptr)
928929
*ret = r == QMessageBox::Ok;

0 commit comments

Comments
 (0)