From 82fca56318f8e5a8c12ba65053a9ef93d49f6aea Mon Sep 17 00:00:00 2001 From: Scoder12 <34356756+Scoder12@users.noreply.github.com> Date: Mon, 10 Aug 2020 19:00:01 -0700 Subject: [PATCH] Fix bug with auth.signed_in If header doesn't exist, name will be None, which is not equal to an empty string making signed_in pass. Changed to bool because None and empty string are both falsey --- src/replit/maqpy/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/replit/maqpy/app.py b/src/replit/maqpy/app.py index a72de74..1e8be3e 100644 --- a/src/replit/maqpy/app.py +++ b/src/replit/maqpy/app.py @@ -39,7 +39,7 @@ class ReplitAuthContext: Returns: bool: whether or not the authentication is activated. """ - return self.name != "" + return bool(self.name) class Request(flask.Request):