Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect against set but empty OAuth variables #1292

Merged
merged 2 commits into from Jun 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions server/settings/_prodbase.py
Expand Up @@ -24,9 +24,9 @@ class Config(object):
'key': os.environ.get("SENDGRID_KEY")
}

if "GOOGLE_ID" in os.environ or "GOOGLE_SECRET" in os.environ:
if os.environ.get("GOOGLE_ID") and os.environ.get("GOOGLE_SECRET"):
OAUTH_PROVIDER = 'GOOGLE'
elif "MICROSOFT_APP_ID" in os.environ or "MICROSOFT_APP_SECRET" in os.environ:
elif os.environ.get("MICROSOFT_APP_ID") and os.environ.get("MICROSOFT_APP_SECRET"):
OAUTH_PROVIDER = 'MICROSOFT'
else:
print("Please set the Google or Microsoft OAuth ID and Secret variables.")
Expand Down