mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-22 18:32:45 +01:00
restrict read/write of cached auth secrets to user
This commit is contained in:
parent
d6c1ab868c
commit
5c82bf6eba
3
dist/chromium/publish-beta.py
vendored
3
dist/chromium/publish-beta.py
vendored
@ -64,8 +64,11 @@ def input_secret(prompt, token):
|
||||
value = ubo_secrets[token]
|
||||
elif token not in ubo_secrets or value != ubo_secrets[token]:
|
||||
ubo_secrets[token] = value
|
||||
exists = os.path.isfile(ubo_secrets_filename)
|
||||
with open(ubo_secrets_filename, 'w') as f:
|
||||
json.dump(ubo_secrets, f, indent=2)
|
||||
if not exists:
|
||||
os.chmod(ubo_secrets_filename, 0o600)
|
||||
return value
|
||||
|
||||
|
||||
|
3
dist/firefox/publish-signed-beta.py
vendored
3
dist/firefox/publish-signed-beta.py
vendored
@ -82,8 +82,11 @@ def input_secret(prompt, token):
|
||||
value = ubo_secrets[token]
|
||||
elif token not in ubo_secrets or value != ubo_secrets[token]:
|
||||
ubo_secrets[token] = value
|
||||
exists = os.path.isfile(ubo_secrets_filename)
|
||||
with open(ubo_secrets_filename, 'w') as f:
|
||||
json.dump(ubo_secrets, f, indent=2)
|
||||
if not exists:
|
||||
os.chmod(ubo_secrets_filename, 0o600)
|
||||
return value
|
||||
|
||||
# GitHub API token
|
||||
|
Loading…
Reference in New Issue
Block a user