Skip to content

Commit

Permalink
[fix] Replace new lines in secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
georgejkaye committed Dec 17, 2023
1 parent 12f1bc0 commit de1b031
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/src/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_secret(name: str) -> str:
if not os.path.isfile(file):
raise FileNotFoundError(f"Secret file {file} not found")
with open(file, "r") as f:
secret = f.read()
secret = f.read().replace("\n", "")
return secret


Expand Down
2 changes: 1 addition & 1 deletion daemon/src/daemon/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def get_secret(name: str) -> str:
if not os.path.isfile(file):
raise FileNotFoundError(f"Secret file {file} not found")
with open(file, "r") as f:
secret = f.read()
secret = f.read().replace("\n", "")
return secret


Expand Down
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ secrets:
metoffice_secret:
file: metoffice-secret.txt
admin_password:
file: admin-password.txt
file: admin-password.txt

0 comments on commit de1b031

Please sign in to comment.