- November 23, 2010
- Not specified
- django python post facebook csrf fb
- 1 (after 1 ratings)
This assumes that you have a method called decode_signed_request which will validate the signed_request parameter and return None if the validation check fails.
A similar method can be found here - https://github.com/iplatform/pyFaceGraph/blob/70e456c79f1ac1c7eddece03af323346a00481ef/src/facegraph/canvas.py
1 2 3 4 5 6 7 8
class IgnoreFbCsrfMiddleware(object): def process_request(self, request): signed_request = request.REQUEST.get('signed_request', None) signed_request = decode_signed_request(signed_request, settings.FACEBOOK_APP_SECRET) request.csrf_processing_done = signed_request != None