Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'scope' by shallow copy #40

if1live opened this issue Sep 6, 2013 · 0 comments


Copy link

commented Sep 6, 2013

in, (or other providers that use 'scope')

  • First connection to '/login' => success
  • Second connection to '/login' => Fail with "KeyError: scope"

because use shallow copy

params = self.request_token_params or {}
scope = params.pop('scope')

At app beginning, request_token_params = {'scope' : 'something' }
At first connection, params is shallow copy of request_token_params. then pop 'scope'. Now, request_token_params = {}
At second connection, there is no 'scope'!

fix bug : use deep copy

- params = self.request_token_params or {}
+ params = dict(self.request_token_params) or {}

this bug is not exist in v0.3.0. but exist in v0.3.1. this commit is cause. 3d3851e

@lepture lepture closed this in 56f917d Sep 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.