Fix #5344 - OAuth NotImplemented exception
authorJessica Tallon <tsyesika@tsyesika.se>
Fri, 21 Aug 2015 15:57:39 +0000 (17:57 +0200)
committerJessica Tallon <tsyesika@tsyesika.se>
Fri, 21 Aug 2015 15:57:39 +0000 (17:57 +0200)
commite9bb5879f772e4d546aadb4bb6f935c7c55b8000
tree28a6c88d8b5e21bf4c0c4fbffdea4689595dd535
parent3b4ad554c7ae17b1b6e431e235e7744e7670be89
Fix #5344 - OAuth NotImplemented exception

This introduces a migration which adds a dummy Client, RequestToken
and AccessToken. These are used when an invalid request comes in,
instead of bailing early, it needs dummy data to prevent timing
attacks.

This then implements the methods which get the IDs of the dummy
objects. If these are changed in the future a migration which checks
for the previous dummy object should be created and updates them to
reflect the new IDs/tokens.
mediagoblin/db/migrations.py
mediagoblin/oauth/__init__.py
mediagoblin/oauth/oauth.py
mediagoblin/oauth/views.py