You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 67ef5151744b347d4a30c985da6712fb0061e675.
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
From 1867195b928ed636b61830abf45594591b40c834 Mon Sep 17 00:00:00 2001
|
||||
From 823ca34bded08b0a861641ba317400b5d8a47a50 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Henrie <alexhenrie24@gmail.com>
|
||||
Date: Sun, 1 Mar 2020 17:58:12 -0700
|
||||
Subject: [PATCH 1/2] winemenubuilder: Blacklist desktop integration for
|
||||
certain associations
|
||||
Subject: [PATCH] winemenubuilder: Blacklist desktop integration for certain
|
||||
associations
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41275
|
||||
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
|
||||
---
|
||||
dlls/mshtml/mshtml.inf | 6 +++
|
||||
loader/wine.inf.in | 10 ++++
|
||||
programs/winemenubuilder/winemenubuilder.c | 54 +++++++++++++++++++---
|
||||
3 files changed, 63 insertions(+), 7 deletions(-)
|
||||
loader/wine.inf.in | 10 +++++
|
||||
programs/winemenubuilder/winemenubuilder.c | 52 +++++++++++++++++++---
|
||||
3 files changed, 62 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/mshtml/mshtml.inf b/dlls/mshtml/mshtml.inf
|
||||
index 4a650b444f..548739f432 100644
|
||||
index 4a650b444fc..548739f4326 100644
|
||||
--- a/dlls/mshtml/mshtml.inf
|
||||
+++ b/dlls/mshtml/mshtml.inf
|
||||
@@ -111,6 +111,7 @@ HKCR,"giffile\shell\open\ddeexec",,,"""file:%%1"",,-1,,,,,"
|
||||
@@ -65,10 +65,10 @@ index 4a650b444f..548739f432 100644
|
||||
;; PS
|
||||
HKCR,"MIME\Database\Content Type\application/postscript","Extension",,".ps"
|
||||
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
|
||||
index 8267ef34dc..6c34e20d58 100644
|
||||
index badbd9b4b5a..4784533301b 100644
|
||||
--- a/loader/wine.inf.in
|
||||
+++ b/loader/wine.inf.in
|
||||
@@ -501,6 +501,16 @@ HKCR,MIME\Database\Charset\us-ascii,"AliasForCharset",,iso-8859-1
|
||||
@@ -506,6 +506,16 @@ HKCR,MIME\Database\Charset\us-ascii,"AliasForCharset",,iso-8859-1
|
||||
HKCR,MIME\Database\Charset\visual,"AliasForCharset",,iso-8859-8
|
||||
HKCR,MIME\Database\Charset\Windows-1254,"AliasForCharset",,iso-8859-9
|
||||
|
||||
@@ -86,19 +86,19 @@ index 8267ef34dc..6c34e20d58 100644
|
||||
HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"WBreakerClass",,"{369647e0-17b0-11ce-9950-00aa004bbb1f}"
|
||||
HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"StemmerClass",,""
|
||||
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
|
||||
index fa700f8c19..6f1dd7c571 100644
|
||||
index 65fbecca526..28e86565c06 100644
|
||||
--- a/programs/winemenubuilder/winemenubuilder.c
|
||||
+++ b/programs/winemenubuilder/winemenubuilder.c
|
||||
@@ -2465,7 +2465,7 @@ static BOOL write_freedesktop_mime_type_entry(const char *packages_dir, const ch
|
||||
@@ -2479,7 +2479,7 @@ static BOOL write_freedesktop_mime_type_entry(const char *packages_dir, const ch
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static BOOL is_extension_blacklisted(LPCWSTR extension)
|
||||
+static BOOL is_hard_blacklisted(const WCHAR *extension)
|
||||
-static BOOL is_extension_banned(LPCWSTR extension)
|
||||
+static BOOL is_extension_banned(const WCHAR *extension)
|
||||
{
|
||||
/* These are managed through external tools like wine.desktop, to evade malware created file type associations */
|
||||
static const WCHAR comW[] = {'.','c','o','m',0};
|
||||
@@ -2479,6 +2479,42 @@ static BOOL is_extension_blacklisted(LPCWSTR extension)
|
||||
@@ -2493,6 +2493,42 @@ static BOOL is_extension_banned(LPCWSTR extension)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -141,16 +141,7 @@ index fa700f8c19..6f1dd7c571 100644
|
||||
static const char* get_special_mime_type(LPCWSTR extension)
|
||||
{
|
||||
static const WCHAR lnkW[] = {'.','l','n','k',0};
|
||||
@@ -2552,7 +2588,7 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
|
||||
size *= 2;
|
||||
} while (ret == ERROR_MORE_DATA);
|
||||
|
||||
- if (ret == ERROR_SUCCESS && extensionW[0] == '.' && !is_extension_blacklisted(extensionW))
|
||||
+ if (ret == ERROR_SUCCESS && extensionW[0] == '.' && !is_hard_blacklisted(extensionW))
|
||||
{
|
||||
char *extensionA = NULL;
|
||||
WCHAR *commandW = NULL;
|
||||
@@ -2570,6 +2606,15 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
|
||||
@@ -2591,6 +2627,15 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
|
||||
char *progIdA = NULL;
|
||||
char *mimeProgId = NULL;
|
||||
|
||||
@@ -166,7 +157,7 @@ index fa700f8c19..6f1dd7c571 100644
|
||||
extensionA = wchars_to_utf8_chars(strlwrW(extensionW));
|
||||
if (extensionA == NULL)
|
||||
{
|
||||
@@ -2638,11 +2683,6 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
|
||||
@@ -2659,11 +2704,6 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,5 +170,5 @@ index fa700f8c19..6f1dd7c571 100644
|
||||
if (executableW)
|
||||
openWithIconA = extract_icon(executableW, 0, NULL, FALSE);
|
||||
--
|
||||
2.25.1
|
||||
2.27.0
|
||||
|
||||
|
Reference in New Issue
Block a user