]> git.pld-linux.org Git - packages/vim.git/blob - 5.7.018
official patches for vim.
[packages/vim.git] / 5.7.018
1 To: vim-dev@vim.org
2 Subject: Patch 5.7.018
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 ------------
6
7 Patch 5.7.018
8 Problem:    When running "rvim" or "vim -Z" it was still possible to execute a
9             shell command with system() and backtick-expansion. (Antonios A.
10             Kavarnos)
11 Solution:   Disallow executing a shell command in get_cmd_output() and
12             mch_expand_wildcards().
13 Files:      src/misc1.c, src/os_unix.c
14
15
16 *** ../vim-5.7.17/src/misc1.c   Tue Jun 20 21:30:53 2000
17 --- src/misc1.c Thu Nov 16 16:45:35 2000
18 ***************
19 *** 5695,5700 ****
20 --- 5695,5703 ----
21       int               i = 0;
22       FILE      *fd;
23   
24 +     if (check_restricted() || check_secure())
25 +       return NULL;
26
27       /* get a name for the temp file */
28       if ((tempname = vim_tempname('o')) == NULL)
29       {
30 *** ../vim-5.7.17/src/os_unix.c Wed Jun  7 17:24:21 2000
31 --- src/os_unix.c       Thu Nov 16 17:02:34 2000
32 ***************
33 *** 3334,3339 ****
34 --- 3334,3348 ----
35       if (!have_wildcard(num_pat, pat))
36         return save_patterns(num_pat, pat, num_file, file);
37   
38 +     /*
39 +      * Don't allow the use of backticks in secure and restricted mode.
40 +      */
41 +     if (secure || restricted)
42 +       for (i = 0; i < num_pat; ++i)
43 +           if (vim_strchr(pat[i], '`') != NULL
44 +                   && (check_restricted() || check_secure()))
45 +               return FAIL;
46
47   /*
48    * get a name for the temp file
49    */
50 *** ../vim-5.7.17/src/version.c Thu Nov 16 17:06:52 2000
51 --- src/version.c       Thu Nov 16 16:45:44 2000
52 ***************
53 *** 439,440 ****
54 --- 439,442 ----
55   {   /* Add new patch number below this line */
56 + /**/
57 +     18,
58   /**/
59
60 -- 
61 hundred-and-one symptoms of being an internet addict:
62 156. You forget your friend's name but not her e-mail address.
63
64 ///  Bram Moolenaar     Bram@moolenaar.net     http://www.moolenaar.net  \\\
65 \\\  Vim: http://www.vim.org      ICCF Holland: http://iccf-holland.org  ///
This page took 0.033234 seconds and 3 git commands to generate.