This commit is contained in:
DavidXanatos 2023-07-24 19:08:26 +02:00
parent a90a9003b0
commit 2641edd5cf
12 changed files with 69 additions and 7 deletions

View File

@ -4,6 +4,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [1.10.2 / 5.65.2] - 2023-07-24
### Changed
- "OpenClipboard=n" now also denyes write to clipboard [#1367](https://github.com/sandboxie-plus/Sandboxie/issues/1367)
### Fixed
- fixed issue with cross renaming of directories
- fixed issue with auto scroll not working
- fixed issue with link argumetn handling [#2969](https://github.com/sandboxie-plus/Sandboxie/issues/2969)

View File

@ -21,8 +21,8 @@
#ifndef _MY_VERSION_H
#define _MY_VERSION_H
#define MY_VERSION_BINARY 5,65,1
#define MY_VERSION_STRING "5.65.1"
#define MY_VERSION_BINARY 5,65,2
#define MY_VERSION_STRING "5.65.2"
#define MY_ABI_VERSION 0x56000
// These #defines are used by either Resource Compiler or NSIS installer

View File

@ -614,7 +614,7 @@ _FX NTSTATUS File_OpenForMerge(
//
WCHAR* OldTruePath = File_ResolveTruePath(TruePath, NULL, &TruePathFlags);
if (FILE_PATH_DELETED(TruePathFlags))
if (FILE_PATH_DELETED(TruePathFlags) && !FILE_PATH_RELOCATED(TruePathFlags))
TruePathDeleted = TRUE;
else if (OldTruePath) {

View File

@ -414,7 +414,9 @@ _FX BOOLEAN Gui_Init(HMODULE module)
GUI_IMPORT___(GetClipboardSequenceNumber);
GUI_IMPORT_AW(GetClipboardFormatName);
GUI_IMPORT_AW(RegisterClipboardFormat);
GUI_IMPORT___(SetClipboardData);
GUI_IMPORT___(GetClipboardData);
GUI_IMPORT___(EmptyClipboard);
GUI_IMPORT___(GetRawInputDeviceInfoA);
GUI_IMPORT___(GetRawInputDeviceInfoW);

View File

@ -103,8 +103,12 @@ typedef HWND (*P_GetOpenClipboardWindow)(void);
typedef DWORD (*P_GetClipboardSequenceNumber)(void);
typedef HANDLE (*P_SetClipboardData)(UINT uFormat, HANDLE hMem);
typedef HANDLE (*P_GetClipboardData)(UINT uFormat);
typedef BOOL (*P_EmptyClipboard)();
typedef int (*P_GetClipboardFormatName)(
UINT format, void *lpszFormatName, int cchMaxCount);
@ -577,7 +581,9 @@ GUI_SYS_VAR(SendInput)
GUI_SYS_VAR(OpenClipboard)
GUI_SYS_VAR(CloseClipboard)
GUI_SYS_VAR(SetClipboardData);
GUI_SYS_VAR(GetClipboardData);
GUI_SYS_VAR(EmptyClipboard);
GUI_SYS_VAR(GetClipboardOwner);
GUI_SYS_VAR(GetOpenClipboardWindow);
GUI_SYS_VAR(GetClipboardSequenceNumber);

View File

@ -70,6 +70,8 @@ static BOOL Gui_OpenClipboard(HWND hwnd);
static BOOL Gui_CloseClipboard(void);
static HANDLE Gui_SetClipboardData(UINT uFormat, HANDLE hMem);
static HANDLE Gui_GetClipboardData(UINT uFormat);
static void Gui_GetClipboardData_BMP(void *buf, ULONG fmt);
@ -78,6 +80,8 @@ static void Gui_GetClipboardData_MF(void *buf, ULONG sz, ULONG fmt);
static void Gui_GetClipboardData_EnhMF(void *buf, ULONG sz, ULONG fmt);
static BOOL Gui_EmptyClipboard();
static LONG Gui_ChangeDisplaySettingsExA(
void *lpszDeviceName, void *lpDevMode, HWND hwnd,
DWORD dwflags, void *lParam);
@ -192,7 +196,9 @@ _FX BOOLEAN Gui_InitMisc(HMODULE module)
SBIEDLL_HOOK_GUI(OpenClipboard);
SBIEDLL_HOOK_GUI(CloseClipboard);
SBIEDLL_HOOK_GUI(SetClipboardData);
SBIEDLL_HOOK_GUI(GetClipboardData);
SBIEDLL_HOOK_GUI(EmptyClipboard);
//
// Chinese instant messenger QQ.exe (aka TM.exe) uses OpenInputDesktop,
@ -204,7 +210,7 @@ _FX BOOLEAN Gui_InitMisc(HMODULE module)
// to check if the desktop is locked, and other programs might as well
//
if (1) {
if (!Dll_CompartmentMode) {
typedef HDESK (*P_OpenInputDesktop)(
DWORD dwFlags, BOOL fInherit, ACCESS_MASK dwDesiredAccess);
@ -762,6 +768,34 @@ _FX BOOL Gui_CloseClipboard(void)
}
//---------------------------------------------------------------------------
// Gui_SetClipboardData
//---------------------------------------------------------------------------
_FX HANDLE Gui_SetClipboardData(UINT uFormat, HANDLE hMem)
{
if (!SbieApi_QueryConfBool(NULL, L"OpenClipboard", TRUE))
return NULL;
return __sys_SetClipboardData(uFormat, hMem);
}
//---------------------------------------------------------------------------
// Gui_EmptyClipboard
//---------------------------------------------------------------------------
_FX BOOL Gui_EmptyClipboard()
{
if (!SbieApi_QueryConfBool(NULL, L"OpenClipboard", TRUE))
return NULL;
return __sys_EmptyClipboard();
}
//---------------------------------------------------------------------------
// Gui_GetClipboardData
//---------------------------------------------------------------------------

View File

@ -516,6 +516,7 @@ void CSandBoxPlus::ScanStartMenu()
if(!pLink->Target.isEmpty() && pLink->Target != Link["Path"].toString())
bChanged = true;
pLink->Target = Link["Path"].toString();
pLink->Arguments = Link["Arguments"].toString();
pLink->Icon = Link["IconPath"].toString();
pLink->IconIndex = Link["IconIndex"].toInt();
pLink->WorkDir = Link["WorkingDir"].toString();

View File

@ -166,6 +166,7 @@ public:
QString Folder;
QString Name;
QString Target;
QString Arguments;
QString Icon;
int IconIndex;
QString WorkDir;

View File

@ -1856,7 +1856,14 @@ void CSbieView::UpdateStartMenu(CSandBoxPlus* pBoxEx)
QIcon Icon = LoadWindowsIcon(Link.Icon, Link.IconIndex);
if(Icon.isNull()) Icon = m_IconProvider.icon(QFileInfo(Link.Target));
pAction->setIcon(Icon);
pAction->setData(Link.Target);
QString Command;
if(Link.Target.contains(" "))
Command = "\"" + Link.Target + "\"";
else
Command = Link.Target;
if(!Link.Arguments.isEmpty())
Command += " " + Link.Arguments;
pAction->setData(Command);
pAction->setProperty("Icon", Link.Icon);
pAction->setProperty("IconIndex", Link.IconIndex);
pAction->setProperty("WorkingDir", Link.WorkDir);

View File

@ -328,6 +328,7 @@ CTraceView::CTraceView(bool bStandAlone, QWidget* parent) : QWidget(parent)
m_pTrace->m_pTraceModel->SetTree(m_pTraceTree->isChecked());
m_pTrace->m_pAutoScroll = new QAction(tr("Auto Scroll"));
m_pTrace->m_pAutoScroll->setCheckable(true);
m_pTrace->m_pAutoScroll->setChecked(theConf->GetBool("Options/TraceAutoScroll"));
m_pTrace->GetMenu()->insertAction(m_pTrace->GetMenu()->actions()[0], m_pTrace->m_pAutoScroll);

View File

@ -728,7 +728,7 @@ void COptionsWindow::OnGeneralChanged()
ui.chkCopyPrompt->setEnabled(ui.chkCopyLimit->isChecked());
ui.chkNoCopyWarn->setEnabled(ui.chkCopyLimit->isChecked() && !ui.chkCopyPrompt->isChecked());
ui.chkAutoEmpty->setEnabled(!ui.chkProtectBox->isChecked());
ui.chkAutoEmpty->setEnabled(ui.chkProtectBox->checkState() != Qt::Checked);
ui.chkOpenSpooler->setEnabled(!ui.chkBlockSpooler->isChecked() && !ui.chkNoSecurityIsolation->isChecked());
ui.chkPrintToFile->setEnabled(!ui.chkBlockSpooler->isChecked() && !ui.chkNoSecurityFiltering->isChecked());

View File

@ -3,7 +3,7 @@
#define VERSION_MJR 1
#define VERSION_MIN 10
#define VERSION_REV 1
#define VERSION_UPD 0
#define VERSION_UPD 1
#ifndef STR
#define STR2(X) #X