mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 23:58:18 +00:00
gui: Show messages as text not html
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. Github-Pull: #12617 Rebased-From: 6fbc0986fa2d49a1cb65b60eca71c25c84842a54
This commit is contained in:
parent
f78e7f6589
commit
21dd5127a4
@ -923,6 +923,7 @@ void BitcoinGUI::message(const QString &title, const QString &message, unsigned
|
|||||||
|
|
||||||
showNormalIfMinimized();
|
showNormalIfMinimized();
|
||||||
QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
|
QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
|
||||||
|
mBox.setTextFormat(Qt::PlainText);
|
||||||
int r = mBox.exec();
|
int r = mBox.exec();
|
||||||
if (ret != nullptr)
|
if (ret != nullptr)
|
||||||
*ret = r == QMessageBox::Ok;
|
*ret = r == QMessageBox::Ok;
|
||||||
|
Loading…
Reference in New Issue
Block a user