Skip to content

Commit

Permalink
Fix config file permission
Browse files Browse the repository at this point in the history
User config file contains a secret API that shouldn't be readable to
others
  • Loading branch information
noxonad committed Dec 29, 2024
1 parent 4a66706 commit ea44d42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions timetagger_cli/core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import time
import datetime
import webbrowser
import os

import requests

Expand Down Expand Up @@ -88,6 +89,8 @@ def setup(args=None):
filename = prepare_config_file()
print("Config file: " + filename)
print("Will now (try to) open the config file. Just edit and save the file.")
# Config file contains user secret so it should not be readable to others
os.chmod(filename, 0o640)
open_with_os_default(filename)


Expand Down

0 comments on commit ea44d42

Please sign in to comment.