Merge pull request #772 from amnezia-vpn/feature/check-openvpn-config
added checking for dangerous strings in openvpn configuration files
This commit is contained in:
commit
eb48e4b668
4 changed files with 90 additions and 3 deletions
|
@ -1,13 +1,18 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
import "TextTypes"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property string textColor: "#D7D8DB"
|
||||
property string backGroundColor: "#1C1D21"
|
||||
property string imageColor: "#D7D8DB"
|
||||
property string textString
|
||||
property int textFormat: Text.PlainText
|
||||
|
||||
property string iconPath
|
||||
property real iconWidth: 16
|
||||
|
@ -36,6 +41,13 @@ Rectangle {
|
|||
height: iconHeight
|
||||
|
||||
source: iconPath
|
||||
|
||||
layer {
|
||||
enabled: true
|
||||
effect: ColorOverlay {
|
||||
color: imageColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CaptionTextType {
|
||||
|
@ -45,6 +57,7 @@ Rectangle {
|
|||
Layout.leftMargin: 8
|
||||
|
||||
text: textString
|
||||
textFormat: root.textFormat
|
||||
color: textColor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,6 +125,20 @@ PageType {
|
|||
text: qsTr("Enable WireGuard obfuscation. It may be useful if WireGuard is blocked on your provider.")
|
||||
}
|
||||
|
||||
WarningType {
|
||||
Layout.topMargin: 16
|
||||
Layout.fillWidth: true
|
||||
|
||||
textString: ImportController.getMaliciousWarningText()
|
||||
textFormat: Qt.RichText
|
||||
visible: textString !== ""
|
||||
|
||||
iconPath: "qrc:/images/controls/alert-circle.svg"
|
||||
|
||||
textColor: "#EB5757"
|
||||
imageColor: "#EB5757"
|
||||
}
|
||||
|
||||
WarningType {
|
||||
Layout.topMargin: 16
|
||||
Layout.fillWidth: true
|
||||
|
@ -151,6 +165,8 @@ PageType {
|
|||
anchors.fill: parent
|
||||
anchors.margins: 16
|
||||
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
text: ImportController.getConfig()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue