[vim/vim] Disallow settings variables in ex_let_env() when in restricted mode (PR #19704)

5 views
Skip to first unread message

pyllyukko

unread,
Mar 15, 2026, 3:53:59 PM (3 days ago) Mar 15
to vim/vim, Subscribed

Related issue: #13394


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19704

Commit Summary

  • 1a70727 Add test for restricted mode blocking external diff
  • 3e785a4 Disallow settings variables in ex_let_env() when in restricted mode

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19704@github.com>

pyllyukko

unread,
Mar 15, 2026, 3:57:35 PM (3 days ago) Mar 15
to vim/vim, Push

@pyllyukko pushed 1 commit.

  • 31618d3 Disallow settings variables in ex_let_env() when in restricted mode


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19704/before/3e785a442ed699795f4194d14e8972a3c18ebc61/after/31618d39a89a8b33dbb6ab33a6565c48932f98f9@github.com>

zeertzjq

unread,
Mar 15, 2026, 6:52:26 PM (2 days ago) Mar 15
to vim/vim, Subscribed

@zeertzjq commented on this pull request.


In src/evalvars.c:

> @@ -1712,7 +1712,7 @@ ex_let_env(
 	else if (endchars != NULL
 			      && vim_strchr(endchars, *skipwhite(arg)) == NULL)
 	    emsg(_(e_unexpected_characters_in_let));
-	else if (!check_secure())
+	else if (!check_secure() || !check_restricted())
⬇️ Suggested change
-	else if (!check_secure() || !check_restricted())
+	else if (!check_secure() && !check_restricted())


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19704/review/3950749677@github.com>

pyllyukko

unread,
Mar 16, 2026, 3:50:43 AM (2 days ago) Mar 16
to vim/vim, Push

@pyllyukko pushed 1 commit.

  • 720ac64 Disallow settings variables in ex_let_env() when in restricted mode

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19704/before/31618d39a89a8b33dbb6ab33a6565c48932f98f9/after/720ac647bc82c00fa9cfc78164eceba16b258eb6@github.com>

pyllyukko

unread,
Mar 16, 2026, 3:51:01 AM (2 days ago) Mar 16
to vim/vim, Subscribed

@pyllyukko commented on this pull request.


In src/evalvars.c:

> @@ -1712,7 +1712,7 @@ ex_let_env(
 	else if (endchars != NULL
 			      && vim_strchr(endchars, *skipwhite(arg)) == NULL)
 	    emsg(_(e_unexpected_characters_in_let));
-	else if (!check_secure())
+	else if (!check_secure() || !check_restricted())

Ah. My bad. I fixed it to be the same as in f_setenv.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19704/review/3951990854@github.com>

pyllyukko

unread,
Mar 16, 2026, 3:57:26 AM (2 days ago) Mar 16
to vim/vim, Push

@pyllyukko pushed 1 commit.

  • 7db2a05 Disallow settings variables in ex_let_env() when in restricted mode

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19704/before/720ac647bc82c00fa9cfc78164eceba16b258eb6/after/7db2a05ea22e7bd111e935aecf2d10d54cb483c0@github.com>

Christian Brabandt

unread,
Mar 17, 2026, 4:40:11 PM (12 hours ago) Mar 17
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19704)

thanks


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19704/c4077875127@github.com>

Christian Brabandt

unread,
Mar 17, 2026, 4:40:48 PM (12 hours ago) Mar 17
to vim/vim, Subscribed

Closed #19704 via 15a96a0.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19704/issue_event/23658640141@github.com>

Reply all
Reply to author
Forward
0 new messages