Skip to content

Commit

Permalink
feat: ENH: List of allowed domains as Value
Browse files Browse the repository at this point in the history
  • Loading branch information
Hina Shah committed Apr 24, 2024
1 parent 471f35f commit 9585a5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ GITHUB_SECRET="<insert>"
OAUTH_PROVIDERS="github"
SECRET_KEY="<insert>"
NAMESPACE="default"
stdnfsPvc="stdnfs"
stdnfsPvc="stdnfs"
CSRF_DOMAINS="https://*.remci.org"
11 changes: 7 additions & 4 deletions appstore/appstore/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,13 @@
},
}

CSRF_TRUSTED_ORIGINS = [
"https://*.renci.org",
"https://*.renci.unc.edu"
]
CSRF_TRUSTED_ORIGINS = os.environ.get("CSRF_DOMAINS", "").split(",")
print(CSRF_TRUSTED_ORIGINS)

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This expression logs
sensitive data (secret)
as clear text.
This expression logs
sensitive data (secret)
as clear text.
if CSRF_TRUSTED_ORIGINS == 0:
CSRF_TRUSTED_ORIGINS = [
"https://*.renci.org",
"https://*.renci.unc.edu"
]

# All debug settings
if DEBUG and DEV_PHASE in ("local", "stub", "dev"):
Expand Down

0 comments on commit 9585a5c

Please sign in to comment.