From 0343c1f2a6cf78a68bb55ec410e28d47085a2dbc Mon Sep 17 00:00:00 2001 From: sgerwk Date: Sat, 17 Apr 2021 10:37:35 +0200 Subject: [PATCH] update documentation of the lua tmpfile() function --- doc/lua-scripting.txt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/lua-scripting.txt b/doc/lua-scripting.txt index 5cda553d..f80d56de 100644 --- a/doc/lua-scripting.txt +++ b/doc/lua-scripting.txt @@ -234,13 +234,11 @@ tmpname ():: `os.tmpname`, this one generates ELinks-related names (currently with "elinks" at the beginning of the name). + -WARNING: The `tmpname` function does not create the file and does not - guarantee exclusive access to it: the caller must handle the - possibility that another process creates the file and begins - using it while this function is returning. Failing to do this - may expose you to symlink attacks by other users. To avoid - the risk, use `io.tmpfile` instead; unfortunately, it does not - tell you the name of the file. +WARNING: The `tmpname` function creates the file but does not + guarantee exclusive access to it: another process may delete the + file and recreate it. This exposes you to symlink attacks by other + users. To avoid the risk, use `io.tmpfile` instead; unfortunately, + it does not tell you the name of the file. bind_key (keymap, keystroke, function):: Currently, `keymap` must be the string `"main"`. Keystroke is a