Skip to content

Commit

Permalink
OAuth2Error: Allow falsy values as state
Browse files Browse the repository at this point in the history
The idea is to allow values like `0` to be used a state.
The current implementation only checks for truthiness.
  • Loading branch information
TiphaineLAURENT authored and auvipy committed Oct 6, 2022
1 parent c3dda12 commit f1cc9c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oauthlib/oauth2/rfc6749/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self, description=None, uri=None, state=None,
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
Expand Down

0 comments on commit f1cc9c8

Please sign in to comment.