Problem: popup_create() is not gated by check_secure(), unlike the
similar deferred-callback registrars timer_start() and
feedkeys(). A popup created with a 'time' and 'callback' (or with
close/filter callbacks) registers code that runs after the secure/sandbox
context has been left, which is inconsistent with how
timer_start() and feedkeys() handle the same situation.
Solution: Call check_secure() at the top of popup_create(), matching the
timer_start()/feedkeys() pattern.
closes: #20400
Signed-off-by: Christian Brabandt <cb@256bit.org>
dict_T *d = NULL;
int i;
+ if (check_secure())
+ return NULL;
+
if (argvars != NULL)
{
if (in_vim9script()
call StopVimInTerminal(buf)
endfunc
+func Test_popup_create_sandbox()
+ call assert_fails('sandbox call popup_create("hello", {})', 'E48:')
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 576,
/**/
575,
/**/