Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/etc/matrixcli/config.py shouldn't be world-readable #9

Open
martinvonwittich opened this issue Sep 30, 2020 · 0 comments
Open

/etc/matrixcli/config.py shouldn't be world-readable #9

martinvonwittich opened this issue Sep 30, 2020 · 0 comments

Comments

@martinvonwittich
Copy link

host ~ # find /etc/matrixcli -ls
 49284276      4 drwxr-xr-x   2 root     root         4096 Sep 30 15:20 /etc/matrixcli
 49284482      4 -rw-r--r--   1 root     root          927 Sep 30 15:20 /etc/matrixcli/config.py

Either /etc/matrixcli/config.py should default to 600, or /etc/matrixcli should default to 700. Currently, it's very likely that a user might put a password into config.py, which is then world-readable for all users on the system.

Note that Python will create a subfolder __pycache__ with a cached version of config.py in it; the cached version will copy the permissions of config.py. So if you want to secure your installation, you need to change the permissions on both:

chmod 600 /etc/matrixcli/config.py
chmod 600 /etc/matrixcli/__pycache__/config.*.pyc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant