Skip to content

Commit

Permalink
1.13.2
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Mar 3, 2024
1 parent 6001575 commit 1ff2867
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -17,12 +17,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- added option to prevent sandboxed processes from interfering with power operations [#3640](https://github.com/sandboxie-plus/Sandboxie/issues/3640) (thx Yeyixiao)
- it can be enabled with "BlockInterferePower=y"
- see the sandbox option "Prevents processes in the sandbox from interfering with power operations" in SandMan UI
- added new pattern mechanism using a ** in a pattern as palceholder means an arbitrary path element but not containing a '\'

### Changed
- reworked option for suspending all processes in SandMan (originally introduced in 1.13.1) [#3582](https://github.com/sandboxie-plus/Sandboxie/issues/3582#issuecomment-1969628215)

### Fixed
- fixed privacy mode, NormalFilePath and symbolic link issue [#3660](https://github.com/sandboxie-plus/Sandboxie/issues/3660)
- fixed "Recycle bin for drive * is corrupted" [#3665] (https://github.com/sandboxie-plus/Sandboxie/issues/3665)



Expand Down
4 changes: 2 additions & 2 deletions Sandboxie/common/my_version.h
Expand Up @@ -21,8 +21,8 @@
#ifndef _MY_VERSION_H
#define _MY_VERSION_H

#define MY_VERSION_BINARY 5,68,1
#define MY_VERSION_STRING "5.68.1"
#define MY_VERSION_BINARY 5,68,2
#define MY_VERSION_STRING "5.68.2"
#define MY_ABI_VERSION 0x56800

// These #defines are used by either Resource Compiler or NSIS installer
Expand Down
30 changes: 27 additions & 3 deletions Sandboxie/common/pattern.c
Expand Up @@ -63,6 +63,7 @@ struct _PATTERN {
// allocated as part of this PATTERN object
struct {
BOOLEAN hex;
BOOLEAN no_bs;
USHORT len;
WCHAR *ptr;
} cons[0];
Expand Down Expand Up @@ -100,6 +101,9 @@ _Check_return_ _CRTIMP long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_op
static const WCHAR *Pattern_wcsnstr(
const WCHAR *hstr, const WCHAR *nstr, int nlen);

static const WCHAR *Pattern_wcsnstr_ex(
const WCHAR *hstr, const WCHAR *nstr, int nlen, int no_bs);


//---------------------------------------------------------------------------
// Variables
Expand All @@ -125,6 +129,7 @@ _FX PATTERN *Pattern_Create(
PATTERN *pat;
WCHAR *optr;
BOOLEAN any_hex_cons;
ULONG start_count;

//
// count number of constant parts in the input string, and
Expand Down Expand Up @@ -190,8 +195,11 @@ _FX PATTERN *Pattern_Create(
iptr = string;
while (iptr) {

while (*iptr == L'*')
start_count = num_cons > 0 ? 1 : 0;
while (*iptr == L'*') {
++iptr;
++start_count;
}
iptr2 = wcschr(iptr, L'*');

if (iptr2) {
Expand All @@ -218,6 +226,8 @@ _FX PATTERN *Pattern_Create(
} else
pat->cons[num_cons].hex = FALSE;

pat->cons[num_cons].no_bs = start_count == 2;

++num_cons;
optr += len_ptr + 1;
}
Expand Down Expand Up @@ -404,9 +414,9 @@ _FX int Pattern_Match2(

while (1) {

const WCHAR *ptr = Pattern_wcsnstr(
const WCHAR *ptr = Pattern_wcsnstr_ex(
string + str_index,
pat->cons[con_index].ptr, pat->cons[con_index].len);
pat->cons[con_index].ptr, pat->cons[con_index].len, pat->cons[con_index].no_bs);

if (! ptr) {

Expand Down Expand Up @@ -607,6 +617,18 @@ _FX int Pattern_wcstol(const WCHAR *text, WCHAR **endptr)

_FX const WCHAR *Pattern_wcsnstr(
const WCHAR *hstr, const WCHAR *nstr, int nlen)
{
return Pattern_wcsnstr_ex(hstr, nstr, nlen, FALSE);
}


//---------------------------------------------------------------------------
// Pattern_wcsnstr_ex
//---------------------------------------------------------------------------


_FX const WCHAR *Pattern_wcsnstr_ex(
const WCHAR *hstr, const WCHAR *nstr, int nlen, int no_bs)
{
int i;
while (*hstr) {
Expand All @@ -620,6 +642,8 @@ _FX const WCHAR *Pattern_wcsnstr(
return hstr;
}
++hstr;
if (no_bs && *hstr == L'\\')
break;
}
return NULL;
}
Expand Down
3 changes: 3 additions & 0 deletions Sandboxie/install/Templates.ini
Expand Up @@ -432,6 +432,9 @@ NormalFilePath=%SbieHome%\*
NormalFilePath=%ProgramFiles%\*
NormalFilePath=%ProgramFiles% (x86)\*
NormalFilePath=%ProgramData%\Microsoft\*
# recycle bin
NormalFilePath=?:\$Recycle.Bin\*
WriteFilePath=?:\$Recycle.Bin\**\*
# shell & ui
NormalKeyPath=HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize\*
NormalKeyPath=HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\*
Expand Down
2 changes: 1 addition & 1 deletion SandboxiePlus/version.h
Expand Up @@ -2,7 +2,7 @@

#define VERSION_MJR 1
#define VERSION_MIN 13
#define VERSION_REV 1
#define VERSION_REV 2
#define VERSION_UPD 0

#ifndef STR
Expand Down

0 comments on commit 1ff2867

Please sign in to comment.