diff options
author | Tiphaine LAURENT <25824254+TiphaineLAURENT@users.noreply.github.com> | 2022-05-03 16:39:24 +0200 |
---|---|---|
committer | Asif Saif Uddin <auvipy@gmail.com> | 2022-10-06 13:59:38 +0600 |
commit | f1cc9c8d26c096b7ffee83fae5aae6c1249e7bf8 (patch) | |
tree | 714243b2c69b383c958ebf6aebaef87f4b118841 | |
parent | c3dda126005547184d2688d350585e940be996f5 (diff) | |
download | oauthlib-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.py | 2 |
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 |