diff options
author | xray7224 <jessica@megworld.co.uk> | 2013-07-11 20:55:08 +0100 |
---|---|---|
committer | xray7224 <jessica@megworld.co.uk> | 2013-07-11 20:55:08 +0100 |
commit | 49a47ec991152a5dd25a7460e1d3d11afb73d32d (patch) | |
tree | 34d6ad1a108b3b68f7c846900fb35f8add102daa /mediagoblin/decorators.py | |
parent | 1e2675b0c0ee2bf35705b538ec94978fe4f005d4 (diff) | |
download | mediagoblin-49a47ec991152a5dd25a7460e1d3d11afb73d32d.tar.lz mediagoblin-49a47ec991152a5dd25a7460e1d3d11afb73d32d.tar.xz mediagoblin-49a47ec991152a5dd25a7460e1d3d11afb73d32d.zip |
Ensures endpoint queries with @oauth_required are validated
Diffstat (limited to 'mediagoblin/decorators.py')
-rw-r--r-- | mediagoblin/decorators.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mediagoblin/decorators.py b/mediagoblin/decorators.py index ad36f376..bb2ba7a5 100644 --- a/mediagoblin/decorators.py +++ b/mediagoblin/decorators.py @@ -292,8 +292,10 @@ def oauth_required(controller): body=request.get_data(), headers=dict(request.headers), ) - #print "[VALID] %s" % valid - #print "[REQUEST] %s" % request + + if not valid: + error = "Invalid oauth prarameter." + return json_response({"error": error}, status=400) return controller(request, *args, **kwargs) |