aboutsummaryrefslogtreecommitdiff
path: root/src/mimeview.c
diff options
context:
space:
mode:
authorHiro <Hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-16 13:44:43 +0000
committerHiro <Hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-16 13:44:43 +0000
commitd45214240a9d326147576f03171d2a84cb9e624f (patch)
tree37de4bfe08a358320f53af3ba92598a276a9e6a1 /src/mimeview.c
parent4cae80d0882841522fdd5041ed0af56c4fad5f72 (diff)
win32: restrict launching of executable files.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@651 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/mimeview.c')
-rw-r--r--src/mimeview.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mimeview.c b/src/mimeview.c
index 7f67b163..44a24fb3 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -1122,7 +1122,6 @@ static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
#ifdef G_OS_WIN32
if (!cmdline) {
DWORD dwtype;
- AlertValue avalue;
if (str_has_suffix_case(filename, ".exe") ||
str_has_suffix_case(filename, ".com") ||
@@ -1132,13 +1131,13 @@ static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
str_has_suffix_case(filename, ".vbs") ||
str_has_suffix_case(filename, ".js") ||
GetBinaryType(filename, &dwtype)) {
- avalue = alertpanel_full
+ alertpanel_full
(_("Opening executable file"),
- _("This is an executable file. Do you really want to launch it?"),
- ALERT_WARNING, G_ALERTALTERNATE, FALSE,
- GTK_STOCK_YES, GTK_STOCK_NO, NULL);
- if (avalue != G_ALERTDEFAULT)
- return;
+ _("This is an executable file. Opening executable file is restricted for security.\n"
+ "If you want to launch it, save it to somewhere and make sure it is not an virus or something like a malicious program."),
+ ALERT_WARNING, G_ALERTDEFAULT, FALSE,
+ GTK_STOCK_OK, NULL, NULL);
+ return;
}
execute_open_file(filename, partinfo->content_type);
return;