summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiphaine LAURENT <25824254+TiphaineLAURENT@users.noreply.github.com>2022-05-03 16:39:24 +0200
committerAsif Saif Uddin <auvipy@gmail.com>2022-10-06 13:59:38 +0600
commitf1cc9c8d26c096b7ffee83fae5aae6c1249e7bf8 (patch)
tree714243b2c69b383c958ebf6aebaef87f4b118841
parentc3dda126005547184d2688d350585e940be996f5 (diff)
downloadoauthlib-f1cc9c8d26c096b7ffee83fae5aae6c1249e7bf8.tar.gz
OAuth2Error: Allow falsy values as state
The idea is to allow values like `0` to be used a state. The current implementation only checks for truthiness.
-rw-r--r--oauthlib/oauth2/rfc6749/errors.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/oauthlib/oauth2/rfc6749/errors.py b/oauthlib/oauth2/rfc6749/errors.py
index da24fea..6fcb751 100644
--- a/oauthlib/oauth2/rfc6749/errors.py
+++ b/oauthlib/oauth2/rfc6749/errors.py
@@ -60,7 +60,7 @@ class OAuth2Error(Exception):
self.response_type = request.response_type
self.response_mode = request.response_mode
self.grant_type = request.grant_type
- if not state:
+ if state is None:
self.state = request.state
else:
self.redirect_uri = None