Skip to content
This repository was archived by the owner on Oct 19, 2020. It is now read-only.

Commit b6f19a0

Browse files
committed
Merge pull request #6 from jessepeterson/master.
Protect the settings file with umask
2 parents 8d0204c + 0990837 commit b6f19a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

phone

+2
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ def set_credentials():
5050
while True:
5151
secret = getpass.getpass("API Secret: ")
5252
if len(secret.strip()):
53+
umask = os.umask(066)
5354
handle = open(SETTINGS, "w")
5455
try:
5556
settings = {"username": username, "secret": secret}
5657
json.dump(settings, handle, indent=2)
5758
except:
5859
handle.close()
60+
os.umask(umask)
5961
return
6062
run_file("http://notifo.com/user/settings")
6163

0 commit comments

Comments
 (0)