-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uic: Prevent code injection via invalid property names/values
Fixes: QTBUG-126265 Pick-to: 6.8 6.7 6.5 6.2 5.15 Change-Id: Id0d6706b8565b76fcc7b9e73944dc6d3e8232e49 Reviewed-by: Jarek Kobus <[email protected]>
- Loading branch information
1 parent
756e4d4
commit 53c8d1f
Showing
3 changed files
with
163 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>Form</class> | ||
<widget class="QWidget" name="Form"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>400</width> | ||
<height>300</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<widget class="QPushButton" name="pushButton"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>70</x> | ||
<y>40</y> | ||
<width>91</width> | ||
<height>29</height> | ||
</rect> | ||
</property> | ||
<property name="text("Hello world!"); injected code;//"> | ||
<enum>Qt::FocusPolicy::WheelFocus</enum> | ||
</property> | ||
<property name="text"> | ||
<string>PushButton</string> | ||
</property> | ||
</widget> | ||
<widget class="QPushButton" name="pushButton_2"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>70</x> | ||
<y>110</y> | ||
<width>91</width> | ||
<height>29</height> | ||
</rect> | ||
</property> | ||
<property name="focusPolicy"> | ||
<enum>Qt::FocusPolicy::WheelFocus); injected code;//</enum> | ||
</property> | ||
<property name="text"> | ||
<string>PushButton</string> | ||
</property> | ||
</widget> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/******************************************************************************** | ||
** Form generated from reading UI file 'qtbug126265.ui' | ||
** | ||
** Created by: Qt User Interface Compiler version 6.0.0 | ||
** | ||
** WARNING! All changes made in this file will be lost when recompiling UI file! | ||
********************************************************************************/ | ||
|
||
#ifndef QTBUG126265_H | ||
#define QTBUG126265_H | ||
|
||
#include <QtCore/QVariant> | ||
#include <QtWidgets/QApplication> | ||
#include <QtWidgets/QPushButton> | ||
#include <QtWidgets/QWidget> | ||
|
||
QT_BEGIN_NAMESPACE | ||
|
||
class Ui_Form | ||
{ | ||
public: | ||
QPushButton *pushButton; | ||
QPushButton *pushButton_2; | ||
|
||
void setupUi(QWidget *Form) | ||
{ | ||
if (Form->objectName().isEmpty()) | ||
Form->setObjectName("Form"); | ||
Form->resize(400, 300); | ||
pushButton = new QPushButton(Form); | ||
pushButton->setObjectName("pushButton"); | ||
pushButton->setGeometry(QRect(70, 40, 91, 29)); | ||
pushButton_2 = new QPushButton(Form); | ||
pushButton_2->setObjectName("pushButton_2"); | ||
pushButton_2->setGeometry(QRect(70, 110, 91, 29)); | ||
|
||
retranslateUi(Form); | ||
|
||
QMetaObject::connectSlotsByName(Form); | ||
} // setupUi | ||
|
||
void retranslateUi(QWidget *Form) | ||
{ | ||
Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr)); | ||
pushButton->setText(QCoreApplication::translate("Form", "PushButton", nullptr)); | ||
pushButton_2->setText(QCoreApplication::translate("Form", "PushButton", nullptr)); | ||
} // retranslateUi | ||
|
||
}; | ||
|
||
namespace Ui { | ||
class Form: public Ui_Form {}; | ||
} // namespace Ui | ||
|
||
QT_END_NAMESPACE | ||
|
||
#endif // QTBUG126265_H |