Skip to content

Commit 6d87e9e

Browse files
committed
patch 8.0.0887: can create a logfile in the sandbox
Problem: Can create a logfile in the sandbox. Solution: Disable ch_logfile() in the sandbox. (Yasuhiro Matsumoto)
1 parent f8d57a5 commit 6d87e9e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/evalfunc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,6 +1930,9 @@ f_ch_logfile(typval_T *argvars, typval_T *rettv UNUSED)
19301930
char_u *opt = (char_u *)"";
19311931
char_u buf[NUMBUFLEN];
19321932

1933+
/* Don't open a file in restricted mode. */
1934+
if (check_restricted() || check_secure())
1935+
return;
19331936
fname = get_tv_string(&argvars[0]);
19341937
if (argvars[1].v_type == VAR_STRING)
19351938
opt = get_tv_string_buf(&argvars[1], buf);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
887,
772774
/**/
773775
886,
774776
/**/

0 commit comments

Comments
 (0)