Switch the base case for when a scope string contains an invalid scope.

This commit is contained in:
Jake Moshenko 2015-08-05 17:35:02 -04:00
parent d480a204f5
commit b2844fb8c7
2 changed files with 6 additions and 5 deletions

View file

@ -101,7 +101,7 @@ def scopes_from_scope_string(scopes):
# https://tools.ietf.org/html/rfc6749#section-3.3
# However, we also support commas for backwards compatibility with existing callers to our code.
scope_set = {ALL_SCOPES.get(scope, None) for scope in re.split(' |,', scopes)}
return scope_set if not None in scope_set else {}
return scope_set if not None in scope_set else set()
def validate_scope_string(scopes):