This commit is contained in:
DavidXanatos 2024-09-30 14:18:08 +02:00
parent 69e9b2c64c
commit 8b3411a1b5
5 changed files with 49 additions and 33 deletions

View File

@ -5,6 +5,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [1.14.10 / 5.69.10] - 2024-09-
### Added
- added Ability to import encrypted archive files directly [#4255](https://github.com/sandboxie-plus/Sandboxie/issues/4255)
### Fixed
- fixed issue with sandbox path entry combo boxes
- fixed Proxy for GetRawInputDeviceInfoW() causes a buffer overflow [#4267](https://github.com/sandboxie-plus/Sandboxie/issues/4267) (thanks marti4d)

View File

@ -16,26 +16,6 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="QLineEdit" name="txtName"/>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Import Sandbox from an archive</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Import Sandbox Name</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
@ -43,18 +23,8 @@
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
<item row="1" column="1">
<widget class="QLineEdit" name="txtName"/>
</item>
<item row="2" column="2">
<widget class="QToolButton" name="btnRoot">
@ -70,6 +40,43 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Import Sandbox Name</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Export Sandbox from an archive</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="chkNoCrypt">
<property name="text">
<string>Import without encryption</string>
</property>
</widget>
</item>
</layout>
</item>
<item>

View File

@ -1074,6 +1074,8 @@ QString CSbieView::ImportSandbox()
QString Name = NameEx.first;
CExtractDialog optWnd(Name, this);
if(!Password.isEmpty())
optWnd.ShowNoCrypt();
if (!theGUI->SafeExec(&optWnd) == 1)
return "";
Name = optWnd.GetName();
@ -1090,7 +1092,7 @@ QString CSbieView::ImportSandbox()
if (!BoxRoot.isEmpty())
pBox->SetFileRoot(BoxRoot);
if (!Password.isEmpty()) {
if (!Password.isEmpty() && !optWnd.IsNoCrypt()) {
Status = pBoxEx->ImBoxCreate(ImageSize / 1024, Password);
if (!Status.IsError())
Status = pBoxEx->ImBoxMount(Password, true, true);

View File

@ -41,6 +41,8 @@ CExtractDialog::CExtractDialog(const QString& Name, QWidget *parent)
ui.cmbRoot->setCurrentText(FilePath.replace("/", "\\"));
});
ui.chkNoCrypt->setVisible(false);
connect(ui.buttonBox, SIGNAL(accepted()), SLOT(OnAccept()));
connect(ui.buttonBox, SIGNAL(rejected()), SLOT(reject()));

View File

@ -14,6 +14,8 @@ public:
QString GetName() const { return ui.txtName->text(); }
QString GetRoot() const;
void ShowNoCrypt() const { ui.chkNoCrypt->setVisible(true); }
bool IsNoCrypt() const { return ui.chkNoCrypt->isChecked(); }
private slots:
void OnAccept();