diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ee7aac2..bb275ac7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,18 @@ This project adheres to [Semantic Versioning](http://semver.org/). - You can also use "Sandman.exe /add_force program_path" to do it +## [1.14.5 / 5.69.5] - 2024-07-? + +### Added + +### Fixed +- fixed Getting two advanced supporter certificate popups everytime I open Sandbox Settings on any sandbox [#4074](https://github.com/sandboxie-plus/Sandboxie/issues/4074) +- fixed issue with HwID bound serial keys failing when no HwID could be obtained + +### Changed +- the certificate format can now take an explicit validity days specification, needed for gapless certificat renewal. + + ## [1.14.4 / 5.69.4] - 2024-07-13 @@ -24,6 +36,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - added hwid display + ## [1.14.3 / 5.69.3] - 2024-07-01 ### Changed diff --git a/README.md b/README.md index c083bc31..b306bf2d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,4 @@ # Sandboxie Plus / Classic ---- -### Note: This is a community fork that took place after the release of the Sandboxie source code and not the official continuation of the previous development (see the [project history](./README.md#-project-history) and [#2926](https://github.com/sandboxie-plus/Sandboxie/issues/2926)). ---- [![Plus license](https://img.shields.io/badge/Plus%20license-Custom%20-blue.svg)](./LICENSE.Plus) [![Classic license](https://img.shields.io/github/license/Sandboxie-Plus/Sandboxie?label=Classic%20license&color=blue)](./LICENSE.Classic) [![GitHub Release](https://img.shields.io/github/release/sandboxie-plus/Sandboxie.svg)](https://github.com/sandboxie-plus/Sandboxie/releases/latest) [![GitHub Pre-Release](https://img.shields.io/github/release/sandboxie-plus/Sandboxie/all.svg?label=pre-release)](https://github.com/sandboxie-plus/Sandboxie/releases) [![GitHub Build Status](https://github.com/sandboxie-plus/Sandboxie/actions/workflows/main.yml/badge.svg)](https://github.com/sandboxie-plus/Sandboxie/actions) [![GitHub Codespell Status](https://github.com/sandboxie-plus/Sandboxie/actions/workflows/codespell.yml/badge.svg)](https://github.com/sandboxie-plus/Sandboxie/actions/workflows/codespell.yml) @@ -15,6 +12,8 @@ Sandboxie is a sandbox-based isolation software for 32-bit and 64-bit Windows NT Sandboxie allows you to create virtually unlimited sandboxes and run them alone or simultaneously to isolate programs from the host and each other, while also allowing you to run as many programs simultaneously in a single box as you wish. +**Note: This is a community fork that took place after the release of the Sandboxie source code and not the official continuation of the previous development (see the [project history](./README.md#-project-history)).** + ## ⏬ Download [Latest Release](https://github.com/sandboxie-plus/Sandboxie/releases/latest) diff --git a/Sandboxie/common/my_version.h b/Sandboxie/common/my_version.h index 0d09cf2f..6774d6db 100644 --- a/Sandboxie/common/my_version.h +++ b/Sandboxie/common/my_version.h @@ -26,7 +26,7 @@ #define VERSION_MJR 5 #define VERSION_MIN 69 -#define VERSION_REV 4 +#define VERSION_REV 5 #define VERSION_UPD 0 #if VERSION_UPD > 0 diff --git a/Sandboxie/core/drv/verify.c b/Sandboxie/core/drv/verify.c index b61b8c04..8dc9cdf1 100644 --- a/Sandboxie/core/drv/verify.c +++ b/Sandboxie/core/drv/verify.c @@ -443,7 +443,7 @@ extern POOL *Driver_Pool; NTSTATUS Conf_Read_Line(STREAM *stream, WCHAR *line, int *linenum); -_FX VOID KphParseDate(const WCHAR* date_str, LARGE_INTEGER* date) +_FX BOOLEAN KphParseDate(const WCHAR* date_str, LARGE_INTEGER* date) { TIME_FIELDS timeFiled = { 0 }; const WCHAR* ptr = date_str; @@ -464,8 +464,11 @@ _FX VOID KphParseDate(const WCHAR* date_str, LARGE_INTEGER* date) timeFiled.Year = (CSHORT)_wtoi(ptr); RtlTimeFieldsToTime(&timeFiled, date); + + return TRUE; } } + return FALSE; } // Example of __DATE__ string: "Jul 27 2012" @@ -553,6 +556,7 @@ _FX NTSTATUS KphValidateCertificate() LONG amount = 1; WCHAR* key = NULL; LARGE_INTEGER cert_date = { 0 }; + LONG days = 0; Verify_CertInfo.State = 0; // clear @@ -673,7 +677,15 @@ _FX NTSTATUS KphValidateCertificate() if (_wcsicmp(L"DATE", name) == 0 && cert_date.QuadPart == 0) { // DD.MM.YYYY - KphParseDate(value, &cert_date); + if (KphParseDate(value, &cert_date)) { + // DD.MM.YYYY +Days + WCHAR ptr = wcschr(value, L'+'); + if (ptr) + days = _wtol(ptr); + } + } + else if (_wcsicmp(L"DAYS", name) == 0) { + days = _wtol(value); } else if (_wcsicmp(L"TYPE", name) == 0 && type == NULL) { // TYPE-LEVEL @@ -840,7 +852,8 @@ _FX NTSTATUS KphValidateCertificate() Verify_CertInfo.level = eCertMaxLevel; else if (CERT_IS_TYPE(Verify_CertInfo, eCertEvaluation)) // in evaluation the level field holds the amount of days to allow evaluation for { - expiration_date.QuadPart = cert_date.QuadPart + KphGetDateInterval((CSHORT)(level ? _wtoi(level) : 7), 0, 0); // x days, default 7 + if(days) expiration_date.QuadPart = cert_date.QuadPart + KphGetDateInterval((CSHORT)(days), 0, 0); + else expiration_date.QuadPart = cert_date.QuadPart + KphGetDateInterval((CSHORT)(level ? _wtoi(level) : 7), 0, 0); // x days, default 7 Verify_CertInfo.level = eCertAdvanced; } else if (!level || _wcsicmp(level, L"STANDARD") == 0) // not used, default does not have explicit level @@ -859,7 +872,7 @@ _FX NTSTATUS KphValidateCertificate() Verify_CertInfo.type = eCertEternal; Verify_CertInfo.level = eCertMaxLevel; } - else if (_wcsicmp(level, L"LARGE") == 0 && cert_date.QuadPart < KphGetDate(1, 04, 2022)) { + else if (_wcsicmp(level, L"LARGE") == 0 && cert_date.QuadPart < KphGetDate(1, 04, 2022)) { // initial batch of semi perpetual large certs Verify_CertInfo.level = eCertAdvanced1; expiration_date.QuadPart = -2; } @@ -889,8 +902,10 @@ _FX NTSTATUS KphValidateCertificate() if (CERT_IS_TYPE(Verify_CertInfo, eCertEternal)) expiration_date.QuadPart = -1; // at the end of time (never) - else if(!expiration_date.QuadPart) - expiration_date.QuadPart = cert_date.QuadPart + KphGetDateInterval(0, 0, 1); // default 1 year, unless set differently already + else if (!expiration_date.QuadPart) { + if (days) expiration_date.QuadPart = cert_date.QuadPart + KphGetDateInterval((CSHORT)(days), 0, 0); + else expiration_date.QuadPart = cert_date.QuadPart + KphGetDateInterval(0, 0, 1); // default 1 year, unless set differently already + } // check if this is a subscription type certificate BOOLEAN isSubscription = CERT_IS_SUBSCRIPTION(Verify_CertInfo); @@ -1091,7 +1106,9 @@ void InitFwUuid() for (; i < 16; i++) ptr = hexbyte(uuid[i], ptr); *ptr++ = 0; - - //DbgPrint("sbie FW-UUID: %S\n", g_uuid_str); } + else // fallback to null guid on error + wcscpy(g_uuid_str, L"00000000-0000-0000-0000-000000000000"); + + DbgPrint("sbie FW-UUID: %S\n", g_uuid_str); } \ No newline at end of file diff --git a/SandboxiePlus/SandMan/Forms/SettingsWindow.ui b/SandboxiePlus/SandMan/Forms/SettingsWindow.ui index 0d4a8de9..d449517a 100644 --- a/SandboxiePlus/SandMan/Forms/SettingsWindow.ui +++ b/SandboxiePlus/SandMan/Forms/SettingsWindow.ui @@ -558,20 +558,6 @@ - - - - Add ‘Make Folder/File Forced' to the context menu - - - - - - - Add 'Open Path to Certain Sandbox' to context menu - - - @@ -651,6 +637,20 @@ + + + + Add ‘Set Force in Sandbox' to the context menu + + + + + + + Add 'Set Open Path in Sandbox' to context menu + + + diff --git a/SandboxiePlus/SandMan/SandMan.cpp b/SandboxiePlus/SandMan/SandMan.cpp index ca73e784..95fe033e 100644 --- a/SandboxiePlus/SandMan/SandMan.cpp +++ b/SandboxiePlus/SandMan/SandMan.cpp @@ -1638,8 +1638,6 @@ void CSandMan::OnMessage(const QString& MsgData) } else if (Message.left(9) == "AddForce:") { - - QString response = QInputDialog::getText(g_GUIParent, tr("Which box you want to add in?"), tr("Type the box name which you are going to set:")); if(!response.isEmpty()) { @@ -1662,8 +1660,6 @@ void CSandMan::OnMessage(const QString& MsgData) } else if (Message.left(8) == "AddOpen:") { - - QString response = QInputDialog::getText(g_GUIParent, tr("Which box you want to add in?"), tr("Type the box name which you are going to set:")); if (!response.isEmpty()) { diff --git a/SandboxiePlus/SandMan/main.cpp b/SandboxiePlus/SandMan/main.cpp index 5f53b6d2..1ab7b086 100644 --- a/SandboxiePlus/SandMan/main.cpp +++ b/SandboxiePlus/SandMan/main.cpp @@ -176,9 +176,7 @@ int main(int argc, char *argv[]) if (!cmdLine0) return -1; LPWSTR cmdLine = cmdLine0 + 10; g_PendingMessage = "AddForce:" + QString::fromWCharArray(cmdLine + 1); - } - if (AOPos != -1) { LPWSTR cmdLine0 = wcsstr(GetCommandLineW(), L"/add_open"); if (!cmdLine0) return -1; diff --git a/SandboxiePlus/version.h b/SandboxiePlus/version.h index f7782510..324f2cdf 100644 --- a/SandboxiePlus/version.h +++ b/SandboxiePlus/version.h @@ -2,7 +2,7 @@ #define VERSION_MJR 1 #define VERSION_MIN 14 -#define VERSION_REV 4 +#define VERSION_REV 5 #define VERSION_UPD 0 #ifndef STR