zulip/scripts/lib
Anders Kaseorg ff1622afcf zulip_tools: Replace deprecated mktemp call.
Although mktemp is deprecated due to security issues, this is not a
security issue.

The security problems with mktemp happen when you open the resulting
filename (without O_EXCL) in a publicly writable directory, because
then someone else might have predicted the filename and created or
symlinked or hardlinked something there between the mktemp and the
open, causing you to write to a file you didn’t expect.

Here we don’t open the resulting filename, we symlink to it.  symlink
will refuse to clobber an existing file, and we handle the error that
arises from this case.  This is the normal way to atomically create a
symlink.

We should still replace mktemp because it’s deprecated, but we can’t
replace it with a function that creates the temporary file.  Instead
we build a random filename ourselves.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-09 14:32:02 -07:00
..
third install-yarn: Fix buggy status check for the signature. 2018-04-09 15:09:37 -07:00
__init__.py Factor out venv-creating code from provision.py. 2016-06-21 11:25:41 -07:00
build-pgroonga provision: Added provision support for Ubuntu 20.04(Focal). 2020-03-17 14:57:14 -07:00
certbot-maybe-renew certbot: Switch to use certbot from apt. 2020-06-08 21:59:29 -07:00
check_rabbitmq_queue.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
clean-unused-caches python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
clean_emoji_cache.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
clean_node_cache.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
clean_venv_cache.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
create-production-venv python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
create-thumbor-venv requirements: Upgrade Thumbor to 7.0.0a5 on Python 3. 2020-07-06 16:09:53 -07:00
email-mirror-postfix email-mirror-postfix: Handle 8-bit messages correctly. 2020-06-14 20:24:06 -07:00
hash_reqs.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
install zthumbor: Remove Python 2 residue. 2020-07-06 18:44:58 -07:00
install-node install-node: Upgrade Node.js to 12.18.0. 2020-06-07 11:06:57 -07:00
node_cache.py python: Convert percent formatting to "".format in certain files. 2020-06-14 23:27:22 -07:00
pythonrc.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
queue_workers.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
setup-apt-repo installer: Remove code specific to stretch or xenial. 2020-06-24 12:57:38 -07:00
setup-apt-repo-debathena installer: Remove code specific to stretch or xenial. 2020-06-24 12:57:38 -07:00
setup-yum-repo setup-yum-repo: Update url of postgresql rpm repo. 2020-06-08 11:26:07 -07:00
setup_path.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
setup_venv.py zthumbor: Remove Python 2 residue. 2020-07-06 18:44:58 -07:00
sharding.py python: Convert more "".format to Python 3.6 f-strings. 2020-06-13 15:39:00 -07:00
unpack-zulip python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
upgrade-zulip python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
upgrade-zulip-from-git python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
upgrade-zulip-stage-2 upgrade: Don't prompt in the second apt-get upgrade. 2020-06-26 16:16:12 -07:00
zulip_tools.py zulip_tools: Replace deprecated mktemp call. 2020-07-09 14:32:02 -07:00