You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
395 B

  1. --- a/src/getchar.c
  2. +++ b/src/getchar.c
  3. @@ -1407,6 +1407,12 @@ openscript(
  4. emsg(_(e_nesting));
  5. return;
  6. }
  7. +
  8. + // Disallow sourcing a file in the sandbox, the commands would be executed
  9. + // later, possibly outside of the sandbox.
  10. + if (check_secure())
  11. + return;
  12. +
  13. #ifdef FEAT_EVAL
  14. if (ignore_script)
  15. /* Not reading from script, also don't open one. Warning message? */