[Xfce4-commits] [xfce/thunar] 01/01: Do not execute but only open shell scripts by default (bug #7596)
noreply at xfce.org
noreply at xfce.org
Thu Feb 19 23:27:52 CET 2015
This is an automated email from the git hooks/post-receive script.
hjudt pushed a commit to branch master
in repository xfce/thunar.
commit ed2274884c25e4e689982c7756d21b5c230d03bc
Author: Harald Judt <h.judt at gmx.at>
Date: Sat Feb 22 17:09:36 2014 +0100
Do not execute but only open shell scripts by default (bug #7596)
With this patch, only real executable files, not scripts, will be
executed.
---
thunar/thunar-file.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index f36ed26..244b658 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -2773,14 +2773,15 @@ thunar_file_is_executable (const ThunarFile *file)
/* check for .exe, .bar or .com */
can_execute = g_content_type_can_be_executable (content_type);
#else
- /* check if the content type is save to execute, we don't use
- * g_content_type_can_be_executable() for unix because it also returns
- * true for "text/plain" and we don't want that */
+ /* Check if the content type is safe to execute, we don't
+ * use g_content_type_can_be_executable() for unix because
+ * it also returns true for "text/plain" and we don't want
+ * that. Also do not execute x-shellscripts by default, it
+ * is safer to open them in an editor or run them in a
+ * terminal, usually they require parameters. */
if (g_content_type_is_a (content_type, "application/x-executable")
- || g_content_type_is_a (content_type, "application/x-shellscript"))
- {
+ && ! g_content_type_is_a (content_type, "application/x-shellscript"))
can_execute = TRUE;
- }
#endif
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list